mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: "Artem B. Bityutskiy" <dedekind@infradead.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [Bug? Report] kref problem
Date: Thu, 16 Mar 2006 10:10:25 -0800	[thread overview]
Message-ID: <20060316181025.GB8280@kroah.com> (raw)
In-Reply-To: <1142532019.3920.79.camel@sauron.oktetlabs.ru>

On Thu, Mar 16, 2006 at 09:00:19PM +0300, Artem B. Bityutskiy wrote:
> On Thu, 2006-03-16 at 09:20 -0800, Greg KH wrote:
> > Again, why are you trying to call the sysfs raw functions?  You are not
> > registering the kobject with the kobject core, so bad things are
> > happening.  Why not call kobject_register() or kobject_add(), like it is
> > documented to do so?
> 
> Well, we were discussing this with you some time ago, and you pointed me
> to these raw functions. My stuff just does not fit device/driver/bu
> modes and you said I have to create whatever sysfs hierarchy I want with
> the raw functions.

Yes, but you still need to register your kobject :)

> kobject_register()/kobject_del() instead of
> sysfs_create_dir()/sysfs_remove_dir() solved my problem, thanks. Just to
> refine this, I'm still going to use
> sysfs_create_file()/sysfs_remove_file() to create whatever attributes I
> want, is this right?

Yes, that should be fine.

> I've just noticed similarity in naming: sysfs_remove_file() creates a
> file, so the symmetrical sysfs_create_dir() creates a directory. So just
> started using it. From the names it was not obvious that I could
> not. :-)

Hm, perhaps I'll just remove the export for that function as the only
thing that should use that is the kobject core, and that can't be built
as a module.

thanks,

greg k-h

  reply	other threads:[~2006-03-16 18:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-16 11:41 Artem B. Bityutskiy
2006-03-16 16:47 ` Greg KH
2006-03-16 16:50   ` Greg KH
2006-03-16 16:50   ` Artem B. Bityutskiy
2006-03-16 16:53 ` Greg KH
2006-03-16 17:07   ` Artem B. Bityutskiy
2006-03-16 17:10     ` Artem B. Bityutskiy
2006-03-16 17:20       ` Greg KH
2006-03-16 18:00         ` Artem B. Bityutskiy
2006-03-16 18:10           ` Greg KH [this message]
2006-03-16 17:18     ` Greg KH
2006-03-16 17:31   ` Dave Hansen
2006-03-16 17:42     ` Greg KH
2006-03-16 17:45   ` Artem B. Bityutskiy
2006-03-16 17:58     ` Greg KH
2006-03-16 18:08       ` Artem B. Bityutskiy
2006-03-16 18:20         ` Greg KH
2006-03-17  9:30           ` Artem B. Bityutskiy
2006-03-17 15:18             ` Greg KH
2006-03-17 16:34               ` Artem B. Bityutskiy

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=20060316181025.GB8280@kroah.com \
    --to=greg@kroah.com \
    --cc=dedekind@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome