netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sfc: initialize dynamic sysfs attributes for lockdep
@ 2012-07-19 17:04 Michal Schmidt
  2012-07-19 17:19 ` Ben Hutchings
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Schmidt @ 2012-07-19 17:04 UTC (permalink / raw)
  To: netdev; +Cc: Ben Hutchings, Solarflare linux maintainers

Dynamically allocated sysfs attributes must be initialized using
sysfs_attr_init(), otherwise lockdep complains:
BUG: key <address> not in .data!

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
 drivers/net/ethernet/sfc/mcdi_mon.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/sfc/mcdi_mon.c b/drivers/net/ethernet/sfc/mcdi_mon.c
index fb7f65b..1d552f0 100644
--- a/drivers/net/ethernet/sfc/mcdi_mon.c
+++ b/drivers/net/ethernet/sfc/mcdi_mon.c
@@ -222,6 +222,7 @@ efx_mcdi_mon_add_attr(struct efx_nic *efx, const char *name,
 	attr->index = index;
 	attr->type = type;
 	attr->limit_value = limit_value;
+	sysfs_attr_init(&attr->dev_attr.attr);
 	attr->dev_attr.attr.name = attr->name;
 	attr->dev_attr.attr.mode = S_IRUGO;
 	attr->dev_attr.show = reader;
-- 
1.7.10.4

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

end of thread, other threads:[~2012-07-19 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 17:04 [PATCH] sfc: initialize dynamic sysfs attributes for lockdep Michal Schmidt
2012-07-19 17:19 ` Ben Hutchings
2012-07-19 17:51   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).