Skip to contentSkip to conversation

scsi: Check if WSR already defined

PATCH In review Nick Krause 2 participants 2 messages Aug 7, 2014

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

PATCH 1/1 scsi: Check if WSR already defined

On xtensa arch there is this warning

drivers/scsi/sym53c8xx_2/sym_defs.h:109:0: warning: "WSR" redefined [enabled by default] arch/xtensa/include/asm/processor.h:188:0: note: this is the location of the previous definition

I can remove WSR since it is not being used but more documentation purpose, so undefining is enough.

---
 drivers/scsi/sym53c8xx_2/sym_defs.h | 4 ++++
 1 file changed, 4 insertions(+)
drivers/scsi/sym53c8xx_2/sym_defs.h +4 -0
index defccc4..68334a5 100644
@@ -91,6 +91,10 @@ struct sym_chip {
 #define FE_CACHE0_SET	(FE_CACHE_SET & ~FE_ERL)
 };
 
+#ifdef WSR
+#undef WSR
+#endif
+
 /*
  *	SYM53C8XX IO register data structure.
  */
Signature · 1 line
2.0.1
#1 lore raw
Quoted 19 lines · Nick Krause

On xtensa arch there is this warning

drivers/scsi/sym53c8xx_2/sym_defs.h:109:0: warning: "WSR" redefined [enabled by default] arch/xtensa/include/asm/processor.h:188:0: note: this is the location of the previous definition

I can remove WSR since it is not being used but more documentation purpose, so undefining is enough.

---
  drivers/scsi/sym53c8xx_2/sym_defs.h | 4 ++++
  1 file changed, 4 insertions(+)
drivers/scsi/sym53c8xx_2/sym_defs.h +0 -0
index defccc4..68334a5 100644

drivers/scsi/sym53c8xx_2/sym_defs.h struct sym_chip { · line 100

Quoted 10 lines
drivers/scsi/sym53c8xx_2/sym_defs.h +4 -0
@@ -91,6 +91,10 @@ struct sym_chip {
  #define FE_CACHE0_SET	(FE_CACHE_SET & ~FE_ERL)
  };
 
+#ifdef WSR
+#undef WSR
+#endif
+
  /*
   *	SYM53C8XX IO register data structure.
   */

Ouch.
Certainly not. Who knows for which odd function the 'WSR' definition is used. Better to redefine WSR in sym_defs.h.

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html