Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1535438 > unrolled thread
| Started by | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| First post | 2016-12-03 16:40 +0100 |
| Last post | 2016-12-03 17:20 +0100 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 3/4] tmp: use pdev for parent device in tpm_chip_alloc Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-03 16:40 +0100
Re: [PATCH v2 3/4] tmp: use pdev for parent device in tpm_chip_alloc Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-03 17:20 +0100
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2016-12-03 16:40 +0100 |
| Subject | Re: [PATCH v2 3/4] tmp: use pdev for parent device in tpm_chip_alloc |
| Message-ID | <sKkzT-36C-9@gated-at.bofh.it> |
On Wed, Nov 23, 2016 at 12:04:13PM +0200, Tomas Winkler wrote:
> The tpm stack uses pdev name convention for the parent device.
> Fix that also in tpm_chip_alloc().
Usually I'm not too fond for minor style fixes but in this case it
improves the clarity.
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
/Jarkko
>
> Fixes: 3897cd9c8d1d ("tpm: Split out the devm stuff from tpmm_chip_alloc")'
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> ---
> V2: resend
> drivers/char/tpm/tpm-chip.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
> index 7a4869151d3b..eefdc809faf0 100644
> --- a/drivers/char/tpm/tpm-chip.c
> +++ b/drivers/char/tpm/tpm-chip.c
> @@ -141,7 +141,7 @@ static void tpm_dev_release(struct device *dev)
> * Allocates a new struct tpm_chip instance and assigns a free
> * device number for it. Must be paired with put_device(&chip->dev).
> */
> -struct tpm_chip *tpm_chip_alloc(struct device *dev,
> +struct tpm_chip *tpm_chip_alloc(struct device *pdev,
> const struct tpm_class_ops *ops)
> {
> struct tpm_chip *chip;
> @@ -160,7 +160,7 @@ struct tpm_chip *tpm_chip_alloc(struct device *dev,
> rc = idr_alloc(&dev_nums_idr, NULL, 0, TPM_NUM_DEVICES, GFP_KERNEL);
> mutex_unlock(&idr_lock);
> if (rc < 0) {
> - dev_err(dev, "No available tpm device numbers\n");
> + dev_err(pdev, "No available tpm device numbers\n");
> kfree(chip);
> return ERR_PTR(rc);
> }
> @@ -170,7 +170,7 @@ struct tpm_chip *tpm_chip_alloc(struct device *dev,
>
> chip->dev.class = tpm_class;
> chip->dev.release = tpm_dev_release;
> - chip->dev.parent = dev;
> + chip->dev.parent = pdev;
> chip->dev.groups = chip->groups;
>
> if (chip->dev_num == 0)
> @@ -182,7 +182,7 @@ struct tpm_chip *tpm_chip_alloc(struct device *dev,
> if (rc)
> goto out;
>
> - if (!dev)
> + if (!pdev)
> chip->flags |= TPM_CHIP_FLAG_VIRTUAL;
>
> cdev_init(&chip->cdev, &tpm_fops);
> --
> 2.7.4
>
[toc] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2016-12-03 17:20 +0100 |
| Message-ID | <sKlcC-3CC-17@gated-at.bofh.it> |
| In reply to | #1535438 |
On Sat, Dec 03, 2016 at 05:35:30PM +0200, Jarkko Sakkinen wrote: > On Wed, Nov 23, 2016 at 12:04:13PM +0200, Tomas Winkler wrote: > > The tpm stack uses pdev name convention for the parent device. > > Fix that also in tpm_chip_alloc(). > > Usually I'm not too fond for minor style fixes but in this case it > improves the clarity. > > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> ... in the sense that the changes do not break the compilation and do not produce sparse or cocciheck errors. I guess that should be enough for these documentation changes. /Jarkko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web