From: Greg KH <gregkh@suse.de>
To: Onkalo Samu <samu.p.onkalo@nokia.com>
Cc: "hmh@hmh.eng.br" <hmh@hmh.eng.br>,
"alan@linux.intel.com" <alan@linux.intel.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sysfs: device-core: sysfs open close notify
Date: Thu, 4 Nov 2010 11:27:58 -0700 [thread overview]
Message-ID: <20101104182758.GA19649@suse.de> (raw)
In-Reply-To: <1288888656.2072.5.camel@noppispoppis.nmp.nokia.com>
On Thu, Nov 04, 2010 at 06:37:36PM +0200, Onkalo Samu wrote:
> On Thu, 2010-11-04 at 17:03 +0100, ext Greg KH wrote:
> > On Thu, Nov 04, 2010 at 02:32:15PM +0100, samu.p.onkalo@nokia.com wrote:
> > > It is easy to get rid of if the mode parameter is used to pass the information
> > > that this entry uses open_close_notify. What do you think, is it ok to use
> > > mode also to that purpose?
> >
> > Don't try to overload a parameter that has been used for the past 40+
> > years in one way, to try to add additional side-band data that has
> > nothing to do with it.
> >
> > That way lies madness.
> >
>
> And that is why I didn't even tried to do that in the first place - even
> if it would have been the simple way.
>
> Is the implementation ok otherwise?
>
> I'll add sysfs_create_file_notify which sets the control bit save way.
> I think it is enough if these entries can be done attribute by
> attribute. It is still possible delete them using normal sysfs
> operations.
No, don't do a separate file create because no one should ever create a
file on its own. It should only be done by bus through a default
attribute, or, in extreem cases, done by purposefully controlling the
kobject uevents where you know exactly what you are doing.
Odds are, any user of this call wouldn't know exactly what they are
doing, so don't give them that opportunity to mess it up.
thanks,
greg k-h
next prev parent reply other threads:[~2010-11-04 18:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-04 9:03 [PATCH] sysfs: device-core: sysfs open close notify Samu Onkalo
2010-11-04 13:23 ` Greg KH
2010-11-04 13:32 ` samu.p.onkalo
2010-11-04 16:03 ` Greg KH
2010-11-04 16:37 ` Onkalo Samu
2010-11-04 18:27 ` Greg KH [this message]
2010-11-05 8:03 ` samu.p.onkalo
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=20101104182758.GA19649@suse.de \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@linux.intel.com \
--cc=hmh@hmh.eng.br \
--cc=linux-kernel@vger.kernel.org \
--cc=samu.p.onkalo@nokia.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