Skip to contentSkip to conversation

staging: ccree: mark debug_regs[] as static

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 3, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: ccree: mark debug_regs[] as static

The global array clashes with an existing symbol of the same name:

drivers/staging/ccree/cc_debugfs.o:(.data+0x0): multiple definition of `debug_regs' drivers/mmc/host/s3cmci.o:(.data+0x70): first defined here

We should fix both, this one addresses the ccree driver by removing the symbol from the global namespace.

Fixes 9bdd203b4dc8 ("s3cmci: add debugfs support for examining driver and hardware state")
Fixes b3ec9a6736f2 ("staging: ccree: staging: ccree: replace sysfs by debugfs interface")
---
 drivers/staging/ccree/cc_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ccree/cc_debugfs.c +1 -1
index 7cd33957fdc6..662fa07af832 100644
@@ -37,7 +37,7 @@ struct cc_debugfs_ctx {
  */
 static struct dentry *cc_debugfs_dir;
 
-struct debugfs_reg32 debug_regs[] = {
+static struct debugfs_reg32 debug_regs[] = {
 	CC_DEBUG_REG(HOST_SIGNATURE),
 	CC_DEBUG_REG(HOST_IRR),
 	CC_DEBUG_REG(HOST_POWER_DOWN_EN),
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw

Hi

Quoted 29 lines · Arnd Bergmann

The global array clashes with an existing symbol of the same name:

drivers/staging/ccree/cc_debugfs.o:(.data+0x0): multiple definition of `debug_regs' drivers/mmc/host/s3cmci.o:(.data+0x70): first defined here

We should fix both, this one addresses the ccree driver by removing the symbol from the global namespace.

Fixes 9bdd203b4dc8 ("s3cmci: add debugfs support for examining driver and hardware state")
Fixes b3ec9a6736f2 ("staging: ccree: staging: ccree: replace sysfs by debugfs interface")
---
 drivers/staging/ccree/cc_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ccree/cc_debugfs.c +1 -2
index 7cd33957fdc6..662fa07af832 100644
@@ -37,7 +37,7 @@ struct cc_debugfs_ctx {
  */
 static struct dentry *cc_debugfs_dir;
 
-struct debugfs_reg32 debug_regs[] = {
+static struct debugfs_reg32 debug_regs[] = {
        CC_DEBUG_REG(HOST_SIGNATURE),
        CC_DEBUG_REG(HOST_IRR),
        CC_DEBUG_REG(HOST_POWER_DOWN_EN),
--
Quoted 2 lines

2.9.0

Thank you Arnd.

I ran into this issue myself via a sparse check (I did not have s3cmci compiled in) and was sure I sent a fix for it but now I see I did not.

Gilad

Signature · 6 lines
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru