public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Paul Mundt <lethal@linux-sh.org>,
	zanussi@us.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH, RFC] sysfs: relay channel buffers as sysfs attributes
Date: Mon, 20 Feb 2006 14:24:49 -0800	[thread overview]
Message-ID: <20060220222449.GC28042@kroah.com> (raw)
In-Reply-To: <20060219185254.GA13391@linux-sh.org>

On Sun, Feb 19, 2006 at 08:52:54PM +0200, Paul Mundt wrote:
> On Sun, Feb 19, 2006 at 09:56:23AM -0800, Greg KH wrote:
> > Note that Pat isn't the sysfs maintainer anymore :)
> > 
> My mistake, I'll check MAINTAINERS instead of the file comments next
> time.
> 
> > On Sun, Feb 19, 2006 at 07:17:48PM +0200, Paul Mundt wrote:
> > > Now with relayfs integrated and the relay_file_operations exported for
> > > use by other file systems, I wonder what people think about adding in a
> > > sysfs attribute for setting up channel buffers.
> > 
> > Looks good, I like it.  This properly handles the module owner stuff,
> > too, right?
> > 
> Could you elaborate on which module owner issue you're referring to?
> struct relay_attribute encapsulates a struct attribute, and it's handled
> the same way as the other attribute types (I modelled it after
> struct bin_attribute), and I don't see any places that I missed.
> 
> When setting up the relay attribute, it's just a matter of:
> 
> 	static struct relay_attribute dev_relay_attr = {
> 		.attr	= {
> 			.owner	= THIS_MODULE,
> 			...
> 		},
> 		...
> 	};
> 
> Let me know if I've missed anything.

No, you are right, just wanted to make sure that the .owner stuff is
there.

One thing to note, a lot of people forgot to set that field for binary
attribute files, while "normal" attributes get it set "automatically"
due to the macro that was used to create them.  You might consider also
creating a macro for this struture so people can not forget to set the
field.

thanks,

greg k-h

  parent reply	other threads:[~2006-02-20 22:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-19 17:17 [PATCH, RFC] sysfs: relay channel buffers as sysfs attributes Paul Mundt
2006-02-19 17:21 ` Christoph Hellwig
2006-02-19 17:56 ` Greg KH
2006-02-19 18:52   ` Paul Mundt
2006-02-20  5:29     ` Tom Zanussi
2006-02-20  9:20       ` Jens Axboe
2006-02-20 11:17       ` Paul Mundt
2006-02-20 13:05       ` Mathieu Desnoyers
2006-02-20 14:17         ` Christoph Hellwig
2006-02-20 17:15         ` Paul Mundt
2006-02-20 17:37           ` Mathieu Desnoyers
2006-02-20 22:27             ` Greg KH
2006-02-21 15:21             ` Paul Mundt
2006-02-21 16:48               ` Mathieu Desnoyers
2006-02-21 17:43                 ` Greg KH
2006-02-22 21:27                   ` Karim Yaghmour
2006-02-22 21:32                     ` Greg KH
2006-02-20 22:24     ` Greg KH [this message]
2006-02-21 15:10       ` [PATCH] sysfs: Add __ATTR_RELAY() helper for relay attributes Paul Mundt

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=20060220222449.GC28042@kroah.com \
    --to=greg@kroah.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zanussi@us.ibm.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