summaryrefslogtreecommitdiff
path: root/drivers/staging/fsl_qbman
diff options
context:
space:
mode:
authorAlex Porosanu <alexandru.porosanu@freescale.com>2014-01-29 13:14:59 (GMT)
committerJose Rivera <German.Rivera@freescale.com>2014-03-03 00:59:33 (GMT)
commite8e3dff5f25993dbeb05d0fa786aec59239384cb (patch)
treee6e58f27949e6325f70b3a283607946955271530 /drivers/staging/fsl_qbman
parent6b4dbdb7be8c4942001dc4df372b366637ea3387 (diff)
downloadlinux-fsl-qoriq-e8e3dff5f25993dbeb05d0fa786aec59239384cb.tar.xz
fsl_qbman: Fix warning if lockdep is enabled in kernel config
When CONFIG_LOCKDEP is set to yes, the following WARNING is generated: WARNING: at kernel/lockdep.c:2986 Modules linked in: NIP: c00000000008d3a0 LR: c00000000008d380 CTR: c000000000317130 REGS: c0000000791071d0 TRAP: 0700 Not tainted (3.8.13-rt9-01934-gc5021a4-dirty) MSR: 0000000080029000 <CE,EE,ME> CR: 24ad2e42 XER: 20000000 SOFTE: 1 TASK = c000000079102040[1] 'swapper/0' THREAD: c000000079104000 CPU: 7 GPR00: c00000000008d36c c000000079107450 c000000000b513e8 0000000000000001 GPR04: 0000000084ad2e44 00000000a14394ec 0000000000000008 0000000000000001 GPR08: 0000000000000000 0000000000000000 000000000000000f 0000000000000001 GPR12: 0000000022ad2e84 c00000000fffbc00 c000000000001c50 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 c0000000007a71d8 GPR20: 0000000000000100 c000000000b2c288 c00000007966b800 c00000000095f860 GPR24: c0000000007a71c0 c00000007966b820 0000000000000000 0000000000000100 GPR28: c000000000b6aef0 c0000000058ab12f c000000005d819a8 0000000000000000 NIP [c00000000008d3a0] .lockdep_init_map+0x3d0/0x580 LR [c00000000008d380] .lockdep_init_map+0x3b0/0x580 Call Trace: [c000000079107450] [c00000000008d36c] .lockdep_init_map+0x39c/0x580 (unreliable) [c000000079107520] [c000000000194eac] .sysfs_add_file_mode+0xbc/0x140 [c0000000791075e0] [c000000000198e08] .internal_create_group+0x118/0x2e0 [c000000079107690] [c0000000005c1db4] .of_fsl_bman_probe+0x294/0x320 [c000000079107770] [c00000000032e64c] .platform_drv_probe+0x2c/0x40 [c0000000791077e0] [c00000000032ca04] .driver_probe_device+0xa4/0x2b0 [c000000079107880] [c00000000032cd0c] .__driver_attach+0xfc/0x100 [c000000079107910] [c00000000032a368] .bus_for_each_dev+0x78/0xe0 [c0000000791079b0] [c00000000032c384] .driver_attach+0x24/0x40 [c000000079107a20] [c00000000032bdb8] .bus_add_driver+0x1f8/0x330 [c000000079107ac0] [c00000000032d3bc] .driver_register+0x9c/0x240 [c000000079107b60] [c00000000032e7d8] .platform_driver_register+0x68/0x80 [c000000079107bd0] [c0000000005c1e58] .bman_ctrl_init+0x18/0x30 [c000000079107c40] [c000000000001534] .do_one_initcall+0x164/0x1e0 [c000000079107cf0] [c0000000009f3c04] .kernel_init_freeable+0x188/0x270 [c000000079107db0] [c000000000001c6c] .kernel_init+0x1c/0x3b0 [c000000079107e30] [c0000000000008d0] .ret_from_kernel_thread+0x64/0x94 Instruction dump: 813c0000 2f890000 409efcf8 48226d15 60000000 2fa30000 419efce8 3d220084 3929c718 81290000 2f890000 409efcd4 <0fe00000> 4bfffccc fbde0000 7fddf378 ---[ end trace 39bdd3537239024e ]--- BUG: key c0000000058ab048 not in .data! BUG: key c0000000058ab078 not in .data! ... As per upstream commit 6992f5334995af474c2b58d010d08bc597f0f2fe, "non-static sysfs attributes need to be initialized with sysfs_attr_init or sysfs_bin_attr_init. Strictly speaking this requirement only exists when lockdep is enabled, and when lockdep is enabled we get a bit fat warning if this requirement is not met." This patch adds the necessary function call in the qbman driver for eliminating the warning. Change-Id: Ia1cb069dc551a8a47ed3682f5e8d1eb2fedb9b6c Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/8460 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Diffstat (limited to 'drivers/staging/fsl_qbman')
-rw-r--r--drivers/staging/fsl_qbman/bman_config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/fsl_qbman/bman_config.c b/drivers/staging/fsl_qbman/bman_config.c
index a0dfb29..a00b3d4 100644
--- a/drivers/staging/fsl_qbman/bman_config.c
+++ b/drivers/staging/fsl_qbman/bman_config.c
@@ -626,6 +626,7 @@ static int of_fsl_bman_probe(struct platform_device *ofdev)
dev_attr_buffer_pool_count[i].show = show_pool_count;
bman_dev_pool_count_attributes[i] =
&dev_attr_buffer_pool_count[i].attr;
+ sysfs_attr_init(bman_dev_pool_count_attributes[i]);
}
bman_dev_pool_count_attributes[bman_pool_max] = NULL;