Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1333445

Re: [tpmdd-devel] [PATCH 2/3] tpm: Get rid of chip->pdev

From Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Newsgroups linux.kernel
Subject Re: [tpmdd-devel] [PATCH 2/3] tpm: Get rid of chip->pdev
Date 2016-02-14 08:10 +0100
Message-ID <r1YYG-7WK-7@gated-at.bofh.it> (permalink)
References <r1vWF-5KL-7@gated-at.bofh.it> <r1vWH-5KL-29@gated-at.bofh.it> <r1KCm-6Lq-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Feb 13, 2016 at 10:39:11AM -0500, Stefan Berger wrote:

> >@@ -347,8 +347,8 @@ static int i2c_nuvoton_recv(struct tpm_chip *chip, u8 *buf, size_t count)
> >   */
> >  static int i2c_nuvoton_send(struct tpm_chip *chip, u8 *buf, size_t len)
> >  {
> >-	struct device *dev = chip->pdev;
> >-	struct i2c_client *client = to_i2c_client(dev);
> >+	struct device *dev = &chip->dev;
> This looks wrong or are you fixing a bug here? chip->dev.parent ?

No, in this function dev is only used for dev_err/etc so it should be
changed, like every other dev_err/etc call in this patch.

Expect for this use:

> >+	struct i2c_client *client = to_i2c_client(chip->dev.parent);
> 
> Does this need to be replaced ?

Which must stay as the parent.

Jason

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] Various struct device cleanups Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 01:10 +0100
  [PATCH 1/3] tpm: Hold the kref during tpm_chip_find_get Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 01:10 +0100
    Re: [PATCH 1/3] tpm: Hold the kref during tpm_chip_find_get Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-13 11:10 +0100
      Re: [PATCH 1/3] tpm: Hold the kref during tpm_chip_find_get Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 16:50 +0100
    Re: [PATCH 1/3] tpm: Hold the kref during tpm_chip_find_get Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-14 06:00 +0100
      Re: [PATCH 1/3] tpm: Hold the kref during tpm_chip_find_get Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-14 08:00 +0100
        Re: [PATCH 1/3] tpm: Hold the kref during tpm_chip_find_get Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-14 09:10 +0100
  [PATCH 3/3] tpm: Get rid of devname Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 01:10 +0100
    Re: [PATCH 3/3] tpm: Get rid of devname Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 02:20 +0100
    Re: [PATCH 3/3] tpm: Get rid of devname Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-14 06:20 +0100
  [PATCH 2/3] tpm: Get rid of chip->pdev Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 01:10 +0100
    Re: [PATCH 2/3] tpm: Get rid of chip->pdev Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 02:20 +0100
      Re: [PATCH 2/3] tpm: Get rid of chip->pdev Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 03:10 +0100
      Re: [PATCH 2/3] tpm: Get rid of chip->pdev Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-13 04:40 +0100
        Re: [PATCH 2/3] tpm: Get rid of chip->pdev Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-14 06:30 +0100
          Re: [PATCH 2/3] tpm: Get rid of chip->pdev Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-14 08:00 +0100
            Re: [PATCH 2/3] tpm: Get rid of chip->pdev Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-14 09:10 +0100
    Re: [tpmdd-devel] [PATCH 2/3] tpm: Get rid of chip->pdev Stefan Berger <stefanb@linux.vnet.ibm.com> - 2016-02-13 16:50 +0100
      Re: [tpmdd-devel] [PATCH 2/3] tpm: Get rid of chip->pdev Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-02-14 08:10 +0100
    Re: [PATCH 2/3] tpm: Get rid of chip->pdev Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-02-14 06:20 +0100

csiph-web