From: Colin Cross <ccross@android.com>
To: Bryan Wu <bryan.wu@canonical.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Richard Purdie <rpurdie@rpsys.net>,
linux-leds@vger.kernel.org
Subject: Re: [PATCH] leds: triggers: send uevent when changing triggers
Date: Tue, 31 Jul 2012 11:28:40 -0700 [thread overview]
Message-ID: <CAMbhsRS82FM90sD52qTTdOFJCoR4GyP+v6bwv+4NKhjn-sqh-Q@mail.gmail.com> (raw)
In-Reply-To: <CAK5ve-KFsFwnvd3TwAvTuBfEdTV8PeNBkVpdQT9NYXH2sN+mBA@mail.gmail.com>
On Thu, Jul 26, 2012 at 9:04 PM, Bryan Wu <bryan.wu@canonical.com> wrote:
> On Fri, Jul 27, 2012 at 12:51 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
>> On Thu, Jul 26, 2012 at 01:03:11PM +0800, Bryan Wu wrote:
>>> Just one quick patch for my idea: emitting a uevent in sysfs_create_file().
>>>
>>> --
>>> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
>>> index 00012e3..04da869 100644
>>> --- a/fs/sysfs/file.c
>>> +++ b/fs/sysfs/file.c
>>> @@ -570,10 +570,14 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd,
>>> const struct attribute *attr,
>>>
>>> int sysfs_create_file(struct kobject * kobj, const struct attribute * attr)
>>> {
>>> + int err = 0;
>>> +
>>> BUG_ON(!kobj || !kobj->sd || !attr);
>>>
>>> - return sysfs_add_file(kobj->sd, attr, SYSFS_KOBJ_ATTR);
>>> + err = sysfs_add_file(kobj->sd, attr, SYSFS_KOBJ_ATTR);
>>> + kobject_uevent(kobj, KOBJ_CHANGE);
>>
>> That's a veritable flood of change events when a new kobject is created,
>> right? It also created uevents for a device that has not told userspace
>> that it is even present, which could cause massive confusion, don't you
>> think?
>>
>
> Indeed, this is unacceptable. I reworked a new patchset and just sent
> our for you review.
>
> Thanks,
> -Bryan
Given the rejection of the other solutions to this problem, and chance
of getting this acked?
next prev parent reply other threads:[~2012-07-31 18:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 0:32 [PATCH] leds: triggers: send uevent when changing triggers Colin Cross
2012-07-25 6:11 ` Bryan Wu
2012-07-25 14:36 ` Greg KH
2012-07-25 18:54 ` Colin Cross
2012-07-26 3:29 ` Bryan Wu
2012-07-26 3:59 ` Greg KH
2012-07-26 5:03 ` Bryan Wu
2012-07-26 16:51 ` Greg KH
2012-07-27 4:04 ` Bryan Wu
2012-07-31 18:28 ` Colin Cross [this message]
2012-08-07 2:57 ` Bryan Wu
2012-08-07 3:34 ` Greg KH
[not found] ` <CAK5ve-KLdwEqW6MLbusMRkaHBQkxTqOGLoVWzSmiuo2qxwtwmA@mail.gmail.com>
2012-08-07 3:43 ` Greg KH
2012-08-07 14:36 ` Henrique de Moraes Holschuh
2012-08-07 19:44 ` Colin Cross
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=CAMbhsRS82FM90sD52qTTdOFJCoR4GyP+v6bwv+4NKhjn-sqh-Q@mail.gmail.com \
--to=ccross@android.com \
--cc=bryan.wu@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=hmh@hmh.eng.br \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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).