public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Jean Delvare <khali@linux-fr.org>,
	Olivier Galibert <galibert@pobox.com>,
	Paul Mackerras <paulus@samba.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: sysfs file creation result nightmare
Date: Wed, 20 Dec 2006 00:01:33 -0800	[thread overview]
Message-ID: <20061220080133.GA4325@kroah.com> (raw)
In-Reply-To: <20061215123103.adfbd78b.akpm@osdl.org>

On Fri, Dec 15, 2006 at 12:31:03PM -0800, Andrew Morton wrote:
> On Sat, 16 Dec 2006 07:16:13 +1100
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> 
> > > Beware that sysfs_remove_bin_file() will complain loudly if you later
> > > attempt to delete that file that was never created.
> > 
> > That's another problem... what is a driver that creates 15 files
> > supposed to do ? Have 15 booleans to remember which files where
> > successfully created and then test all of them on cleanup ? That sounds
> > like even more bloat to me...
> 
> That's the sort of thing which should be done inside sysfs_create_group()
> and sysfs_remove_group().

sysfs_create_group() and remove_group() handles this just fine right
now.  Or it should, if not, please let me know and I'll fix it.

As for the bin_file stuff, those are very rare.  And I'll gladly take
patches that keep bad things from happening if you try to remove a file
that isn't there.

thanks,

greg k-h

  reply	other threads:[~2006-12-20  8:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20061209165606.2f026a6c.khali@linux-fr.org>
2006-12-09 19:59 ` sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings) Benjamin Herrenschmidt
2006-12-09 20:22   ` Muli Ben-Yehuda
2006-12-09 20:53     ` Benjamin Herrenschmidt
2006-12-09 20:38   ` Andrew Morton
2006-12-09 20:55     ` Benjamin Herrenschmidt
2006-12-09 21:44     ` Olivier Galibert
2006-12-09 21:58       ` Andrew Morton
2006-12-09 22:34         ` Olivier Galibert
2006-12-09 22:53           ` Andrew Morton
2006-12-10  0:55             ` Benjamin Herrenschmidt
2006-12-15 14:47               ` sysfs file creation result nightmare Jean Delvare
2006-12-15 20:16                 ` Benjamin Herrenschmidt
2006-12-15 20:31                   ` Andrew Morton
2006-12-20  8:01                     ` Greg KH [this message]
2006-12-20  9:27                       ` Benjamin Herrenschmidt
2006-12-11  2:46           ` sysfs file creation result nightmare (WAS radeonfb: Fix sysfs_create_bin_file warnings) Paul Mackerras
2006-12-14 21:42         ` Bill Davidsen

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=20061220080133.GA4325@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=galibert@pobox.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    /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