From: David Miller <davem@davemloft.net>
To: ebiederm@xmission.com
Cc: gregkh@suse.de, James.Bottomley@suse.de,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] scsi: Add lockdep annotations to SAS sysfs attributes.
Date: Sat, 10 Apr 2010 21:40:17 -0700 (PDT) [thread overview]
Message-ID: <20100410.214017.165974351.davem@davemloft.net> (raw)
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; \
next reply other threads:[~2010-04-11 4:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-11 4:40 David Miller [this message]
2010-04-11 12:35 ` [PATCH 1/2] scsi: Add lockdep annotations to SAS sysfs attributes James Bottomley
2010-04-11 20:11 ` David Miller
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=20100410.214017.165974351.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=James.Bottomley@suse.de \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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