From: Jarkko Sakkinen <jarkko@kernel.org>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: peterhuewe@gmx.de, jgg@ziepe.ca, stefanb@linux.vnet.ibm.com,
James.Bottomley@hansenpartnership.com, David.Laight@aculab.com,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
Lino Sanfilippo <l.sanfilippo@kunbus.com>,
stable@vger.kernel.org
Subject: Re: [PATCH RESEND v5] tpm: fix reference counting for struct tpm_chip
Date: Fri, 19 Feb 2021 11:05:54 +0200 [thread overview]
Message-ID: <YC9/cr9Km/jWzmon@kernel.org> (raw)
In-Reply-To: <5d0f7222-a9ef-809b-cd9a-86bbacb03790@gmx.de>
On Thu, Feb 18, 2021 at 08:13:57PM +0100, Lino Sanfilippo wrote:
>
> Hi,
>
> On 17.02.21 at 23:18, Jarkko Sakkinen wrote:
>
> >> +
> >
> > /*
> > * Please describe what the heck the function does. No need for full on
> > * kdoc.
> > */
>
> Ok.
>
> >> +int tpm2_add_device(struct tpm_chip *chip)
> >
> > Please, rename as tpm_devs_add for coherency sake.
> >
>
> Sorry I confused this and renamed it wrongly. I will fix it in the next
> patch version.
>
> >> +{
> >> + int rc;
> >> +
> >> + device_initialize(&chip->devs);
> >> + chip->devs.parent = chip->dev.parent;
> >> + chip->devs.class = tpmrm_class;
> >
> > Empty line. Cannot recall, if I stated before.
> >> + /* + * get extra reference on main device to hold on behalf of devs.
> >> + * This holds the chip structure while cdevs is in use. The
> >> + * corresponding put is in the tpm_devs_release.
> >> + */
> >> + get_device(&chip->dev);
> >> + chip->devs.release = tpm_devs_release;
> >> + chip->devs.devt = MKDEV(MAJOR(tpm_devt),
> >> + chip->dev_num + TPM_NUM_DEVICES);
> >
> > NAK, same comment as before.
> >
>
> Thx for the review, I will fix these issues.
Yeah, I mean I'm going to collect this fix anyway after rc1 has been
released so there's a lot of time to polish small details. I.e. I'm
doing a PR for rc2 with the fix included.
> Regards,
> Lino
/Jarkko
prev parent reply other threads:[~2021-02-19 9:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-16 19:53 [PATCH RESEND v5] TPM fixes Lino Sanfilippo
2021-02-16 19:53 ` [PATCH RESEND v5] tpm: fix reference counting for struct tpm_chip Lino Sanfilippo
2021-02-17 22:18 ` Jarkko Sakkinen
2021-02-18 19:13 ` Lino Sanfilippo
2021-02-19 9:05 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YC9/cr9Km/jWzmon@kernel.org \
--to=jarkko@kernel.org \
--cc=David.Laight@aculab.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=LinoSanfilippo@gmx.de \
--cc=jgg@ziepe.ca \
--cc=l.sanfilippo@kunbus.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=stable@vger.kernel.org \
--cc=stefanb@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).