lkml.org 
[lkml]   [2021]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 10/15] leds: trigger: blkdev: Add LED trigger activate function
From
Date
On 9/10/21 1:47 AM, Greg KH wrote:
>> + /* Don't allow module to be removed while any LEDs are linked */
>> + if (WARN_ON(!try_module_get(THIS_MODULE))) {
>
> That pattern is racy and broken and never ever ever add it to the kernel
> again please. All existing in-kernel users of it are also wrong, we
> have been removing them for decades now.

OK. (I was misled by the instances that you haven't gotten to yet.)

> You have created a "raw" kobject in the device tree now, which means
> that userspace will not be notified of it and will have a "hole" in it's
> knowledge. Why not just create a named attribute group to this device
> instead?

What would I pass as the first argument to sysfs_create_link() in that
case?

--
========================================================================
In Soviet Russia, Google searches you!
========================================================================

\
 
 \ /
  Last update: 2021-09-10 18:15    [W:0.221 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site