public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sam Bradshaw <sbradshaw@micron.com>
Subject: Re: [PATCH 1/2] mtip32xx: Remove 'registers' and 'flags' from sysfs
Date: Tue, 5 Jun 2012 18:33:14 +0900	[thread overview]
Message-ID: <20120605093314.GC21560@kroah.com> (raw)
In-Reply-To: <4FCD0FC7.9010105@micron.com>

On Mon, Jun 04, 2012 at 12:43:03PM -0700, Asai Thambi S P wrote:
> 
> This patch removes entries 'registers' and 'flags' from sysfs. Updated ABI file
> to reflect this change.
> 
> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>

Much nicer, thanks for doing this:

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

But, one question on a different sysfs file:

>  What:           /sys/block/rssd*/status
>  Date:           April 2012
>  KernelVersion:  3.4
>  Contact:        Asai Thambi S P <asamymuthupa@micron.com>
>  Description:    This is a read-only file. Indicates the status of the device.

What "status" is this showing?  Why is this a sysfs file?  Who
needs/wants it?

Also, if you really want to properly create sysfs files, use the default
attributes for the driver.  As it is, you are creating them after
userspace is notified about the device showing up, which races with the
creation of your additional file(s).  Use the properly driver core field
to have the core create, and remove them, automatically, which saves you
code, and fixes bugs you didn't realize you had :)

thanks,

greg k-h

  parent reply	other threads:[~2012-06-05  9:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 19:43 [PATCH 1/2] mtip32xx: Remove 'registers' and 'flags' from sysfs Asai Thambi S P
2012-06-05  7:16 ` Jens Axboe
2012-06-05  9:33 ` Greg KH [this message]
2012-06-05 18:18   ` Asai Thambi S P
2012-06-05 20:25     ` Greg KH
2012-06-06 18:04       ` Asai Thambi S P
2012-06-06 21:25         ` Greg KH
2012-06-07 23:26           ` Asai Thambi S P

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=20120605093314.GC21560@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=asamymuthupa@micron.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sbradshaw@micron.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