public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] scsi: Add lockdep annotations to SAS sysfs attributes.
@ 2010-04-11  4:40 David Miller
  2010-04-11 12:35 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2010-04-11  4:40 UTC (permalink / raw)
  To: ebiederm; +Cc: gregkh, James.Bottomley, linux-scsi, linux-kernel


They are allocated dynamically, and thus need sysfs_attr_init()
treatment.

Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index 927e99c..f9c61b9 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -1679,15 +1679,17 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel,
  */
 
 #define SETUP_TEMPLATE(attrb, field, perm, test)			\
-	i->private_##attrb[count] = dev_attr_##field;		\
+	i->private_##attrb[count] = dev_attr_##field;			\
 	i->private_##attrb[count].attr.mode = perm;			\
+	sysfs_attr_init(&i->private_##attrb[count].attr);		\
 	i->attrb[count] = &i->private_##attrb[count];			\
 	if (test)							\
 		count++
 
 #define SETUP_TEMPLATE_RW(attrb, field, perm, test, ro_test, ro_perm)	\
-	i->private_##attrb[count] = dev_attr_##field;		\
+	i->private_##attrb[count] = dev_attr_##field;			\
 	i->private_##attrb[count].attr.mode = perm;			\
+	sysfs_attr_init(&i->private_##attrb[count].attr);		\
 	if (ro_test) {							\
 		i->private_##attrb[count].attr.mode = ro_perm;		\
 		i->private_##attrb[count].store = NULL;			\

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] scsi: Add lockdep annotations to SAS sysfs attributes.
  2010-04-11  4:40 [PATCH 1/2] scsi: Add lockdep annotations to SAS sysfs attributes David Miller
@ 2010-04-11 12:35 ` James Bottomley
  2010-04-11 20:11   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2010-04-11 12:35 UTC (permalink / raw)
  To: David Miller; +Cc: ebiederm, gregkh, linux-scsi, linux-kernel

On Sat, 2010-04-10 at 21:40 -0700, David Miller wrote:
> They are allocated dynamically, and thus need sysfs_attr_init()
> treatment.

This should all be taken care of by

commit ebd09ec93c90c8ec571d7e166832fb1fc705bf5e
Author: James Bottomley <James.Bottomley@suse.de>
Date:   Sat Mar 20 12:44:12 2010 -0500

    [SCSI] attirbute_container: Initialize sysfs attributes with
sysfs_attr_init

I can't check the FC class, but I have checked the SAS one, and I don't
see any more lockdep warn ons ... unless there's one I'm not seeing
because of the options I've compiled with?

James



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] scsi: Add lockdep annotations to SAS sysfs attributes.
  2010-04-11 12:35 ` James Bottomley
@ 2010-04-11 20:11   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-04-11 20:11 UTC (permalink / raw)
  To: James.Bottomley; +Cc: ebiederm, gregkh, linux-scsi, linux-kernel

From: James Bottomley <James.Bottomley@suse.de>
Date: Sun, 11 Apr 2010 07:35:12 -0500

> On Sat, 2010-04-10 at 21:40 -0700, David Miller wrote:
>> They are allocated dynamically, and thus need sysfs_attr_init()
>> treatment.
> 
> This should all be taken care of by
> 
> commit ebd09ec93c90c8ec571d7e166832fb1fc705bf5e
> Author: James Bottomley <James.Bottomley@suse.de>
> Date:   Sat Mar 20 12:44:12 2010 -0500

Thanks, that should take care of it, my sparc-2.6 tree hadn't
sync'd with Linus's tree in a while. :-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-11 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-11  4:40 [PATCH 1/2] scsi: Add lockdep annotations to SAS sysfs attributes David Miller
2010-04-11 12:35 ` James Bottomley
2010-04-11 20:11   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox