[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d0f7222-a9ef-809b-cd9a-86bbacb03790@gmx.de>
Date: Thu, 18 Feb 2021 20:13:57 +0100
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: Jarkko Sakkinen <jarkko@...nel.org>
Cc: peterhuewe@....de, jgg@...pe.ca, stefanb@...ux.vnet.ibm.com,
James.Bottomley@...senpartnership.com, David.Laight@...lab.com,
linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
Lino Sanfilippo <l.sanfilippo@...bus.com>,
stable@...r.kernel.org
Subject: Re: [PATCH RESEND v5] tpm: fix reference counting for struct tpm_chip
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.
Regards,
Lino
Powered by blists - more mailing lists