lkml.org 
[lkml]   [2022]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] USB: drop misleading usb_set_intfdata() kernel doc
From


On 12.12.22 11:31, Johan Hovold wrote:
> On Mon, Dec 12, 2022 at 11:19:00AM +0100, Oliver Neukum wrote:
>> On 11.12.22 13:06, Johan Hovold wrote:
>>
>>> Due to a misunderstanding, a redundant and misleading kernel doc comment
>>> for usb_set_intfdata() was recently added which claimed that the driver
>>> data pointer must not be cleared during disconnect before "all actions
>>> [are] completed", which is both imprecise and incorrect.
>>
>> OK, but is that a reason to remove all kerneldoc? Kerneldoc is generally
>> a good thing. And if a pointer is NULLed by driver core, that will need
>> to be in it. IMHO you'd better just remove the questionable part of the
>> kerneldoc.
>
> Yeah, I started off with just rewriting the kernel doc and removing the
> obviously incorrect bits, but then there is essentially nothing left of
> the documentation.

1. that the function exists and its purpose
2. its parameters

most kerneldoc isn't exactly a great revelation. Nevertheless it
serves a purpose.

> A driver does not need to care that the pointer is cleared by driver
> core after the driver is unbound. The driver is gone.

Is that true even with respect to sysfs?

Regards
Oliver

\
 
 \ /
  Last update: 2022-12-12 12:19    [W:0.156 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site