sfc: initialize dynamic sysfs attributes for lockdep
Subsystems (3)
PATCH 1/1 sfc: initialize dynamic sysfs attributes for lockdep
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 <[email protected]>
--- drivers/net/ethernet/sfc/mcdi_mon.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/sfc/mcdi_mon.c +1 -0
@@ -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;
Signature · 1 line
1.7.10.4
Quoted 5 lines · Michal Schmidt
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 <[email protected]>
Acked-by Ben Hutchings <[email protected]>
Quoted 16 lines
--- drivers/net/ethernet/sfc/mcdi_mon.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/sfc/mcdi_mon.c +1
-0@@ -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;
Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
From: Ben Hutchings <[email protected]>
Date: Thu, 19 Jul 2012 18:19:05 +0100
Quoted 8 lines · Michal Schmidt
Quoted 5 lines
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 <[email protected]>Acked-by Ben Hutchings <[email protected]>
Applied.