diff mbox series

SCSI: FlashPoint: rename si_flags field

Message ID 20210529234857.6870-1-rdunlap@infradead.org
State New
Headers show
Series SCSI: FlashPoint: rename si_flags field | expand

Commit Message

Randy Dunlap May 29, 2021, 11:48 p.m. UTC
The BusLogic driver has build errors on ia64 due to a name collision
(in the #included FlashPoint.c file).
Rename the struct field in struct sccb_mgr_info from si_flags to
si_mflags (manager flags) to mend the build.

This is the first problem. There are 50+ others after this one:

In file included from ../include/uapi/linux/signal.h:6,
                 from ../include/linux/signal_types.h:10,
                 from ../include/linux/sched.h:29,
                 from ../include/linux/hardirq.h:9,
                 from ../include/linux/interrupt.h:11,
                 from ../drivers/scsi/BusLogic.c:27:
../arch/ia64/include/uapi/asm/siginfo.h:15:27: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
   15 | #define si_flags _sifields._sigfault._flags
      |                           ^
../drivers/scsi/FlashPoint.c:43:6: note: in expansion of macro 'si_flags'
   43 |  u16 si_flags;
      |      ^~~~~~~~
In file included from ../drivers/scsi/BusLogic.c:51:
../drivers/scsi/FlashPoint.c: In function 'FlashPoint_ProbeHostAdapter':
../drivers/scsi/FlashPoint.c:1076:11: error: 'struct sccb_mgr_info' has no member named '_sifields'
 1076 |  pCardInfo->si_flags = 0x0000;
      |           ^~
../drivers/scsi/FlashPoint.c:1079:12: error: 'struct sccb_mgr_info' has no member named '_sifields'

Fixes: 391e2f25601e ("[SCSI] BusLogic: Port driver to 64-bit.")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Khalid Aziz <khalid@gonehiking.org>
---
 drivers/scsi/FlashPoint.c |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Comments

Hannes Reinecke May 30, 2021, 8:10 a.m. UTC | #1
On 5/30/21 1:48 AM, Randy Dunlap wrote:
> The BusLogic driver has build errors on ia64 due to a name collision

> (in the #included FlashPoint.c file).

> Rename the struct field in struct sccb_mgr_info from si_flags to

> si_mflags (manager flags) to mend the build.

> 

> This is the first problem. There are 50+ others after this one:

> 

> In file included from ../include/uapi/linux/signal.h:6,

>                   from ../include/linux/signal_types.h:10,

>                   from ../include/linux/sched.h:29,

>                   from ../include/linux/hardirq.h:9,

>                   from ../include/linux/interrupt.h:11,

>                   from ../drivers/scsi/BusLogic.c:27:

> ../arch/ia64/include/uapi/asm/siginfo.h:15:27: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token

>     15 | #define si_flags _sifields._sigfault._flags

>        |                           ^

> ../drivers/scsi/FlashPoint.c:43:6: note: in expansion of macro 'si_flags'

>     43 |  u16 si_flags;

>        |      ^~~~~~~~

> In file included from ../drivers/scsi/BusLogic.c:51:

> ../drivers/scsi/FlashPoint.c: In function 'FlashPoint_ProbeHostAdapter':

> ../drivers/scsi/FlashPoint.c:1076:11: error: 'struct sccb_mgr_info' has no member named '_sifields'

>   1076 |  pCardInfo->si_flags = 0x0000;

>        |           ^~

> ../drivers/scsi/FlashPoint.c:1079:12: error: 'struct sccb_mgr_info' has no member named '_sifields'

> 

> Fixes: 391e2f25601e ("[SCSI] BusLogic: Port driver to 64-bit.")

> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

> Reported-by: kernel test robot <lkp@intel.com>

> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>

> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>

> Cc: Christoph Hellwig <hch@lst.de>

> Cc: Jens Axboe <axboe@kernel.dk>

> Cc: Hannes Reinecke <hare@suse.de>

> Cc: Khalid Aziz <khalid.aziz@oracle.com>

> Cc: Khalid Aziz <khalid@gonehiking.org>

> ---

>   drivers/scsi/FlashPoint.c |   32 ++++++++++++++++----------------

>   1 file changed, 16 insertions(+), 16 deletions(-)

> 

Reviewed-by: Hannes Reinecke <hare@suse.de>


Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Martin K. Petersen June 2, 2021, 3:25 a.m. UTC | #2
Randy,

> The BusLogic driver has build errors on ia64 due to a name collision

> (in the #included FlashPoint.c file).  Rename the struct field in

> struct sccb_mgr_info from si_flags to si_mflags (manager flags) to

> mend the build.


Applied to 5.14/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Martin K. Petersen June 8, 2021, 3:05 a.m. UTC | #3
On Sat, 29 May 2021 16:48:57 -0700, Randy Dunlap wrote:

> The BusLogic driver has build errors on ia64 due to a name collision

> (in the #included FlashPoint.c file).

> Rename the struct field in struct sccb_mgr_info from si_flags to

> si_mflags (manager flags) to mend the build.

> 

> This is the first problem. There are 50+ others after this one:

> 

> [...]


Applied to 5.14/scsi-queue, thanks!

[1/1] SCSI: FlashPoint: rename si_flags field
      https://git.kernel.org/mkp/scsi/c/4d431153e751

-- 
Martin K. Petersen	Oracle Linux Engineering
diff mbox series

Patch

--- linux-next-20210528.orig/drivers/scsi/FlashPoint.c
+++ linux-next-20210528/drivers/scsi/FlashPoint.c
@@ -40,7 +40,7 @@  struct sccb_mgr_info {
 	u16 si_per_targ_ultra_nego;
 	u16 si_per_targ_no_disc;
 	u16 si_per_targ_wide_nego;
-	u16 si_flags;
+	u16 si_mflags;
 	unsigned char si_card_family;
 	unsigned char si_bustype;
 	unsigned char si_card_model[3];
@@ -1073,22 +1073,22 @@  static int FlashPoint_ProbeHostAdapter(s
 		ScamFlg =
 		    (unsigned char)FPT_utilEERead(ioport, SCAM_CONFIG / 2);
 
-	pCardInfo->si_flags = 0x0000;
+	pCardInfo->si_mflags = 0x0000;
 
 	if (i & 0x01)
-		pCardInfo->si_flags |= SCSI_PARITY_ENA;
+		pCardInfo->si_mflags |= SCSI_PARITY_ENA;
 
 	if (!(i & 0x02))
-		pCardInfo->si_flags |= SOFT_RESET;
+		pCardInfo->si_mflags |= SOFT_RESET;
 
 	if (i & 0x10)
-		pCardInfo->si_flags |= EXTENDED_TRANSLATION;
+		pCardInfo->si_mflags |= EXTENDED_TRANSLATION;
 
 	if (ScamFlg & SCAM_ENABLED)
-		pCardInfo->si_flags |= FLAG_SCAM_ENABLED;
+		pCardInfo->si_mflags |= FLAG_SCAM_ENABLED;
 
 	if (ScamFlg & SCAM_LEVEL2)
-		pCardInfo->si_flags |= FLAG_SCAM_LEVEL2;
+		pCardInfo->si_mflags |= FLAG_SCAM_LEVEL2;
 
 	j = (RD_HARPOON(ioport + hp_bm_ctrl) & ~SCSI_TERM_ENA_L);
 	if (i & 0x04) {
@@ -1104,7 +1104,7 @@  static int FlashPoint_ProbeHostAdapter(s
 
 	if (!(RD_HARPOON(ioport + hp_page_ctrl) & NARROW_SCSI_CARD))
 
-		pCardInfo->si_flags |= SUPPORT_16TAR_32LUN;
+		pCardInfo->si_mflags |= SUPPORT_16TAR_32LUN;
 
 	pCardInfo->si_card_family = HARPOON_FAMILY;
 	pCardInfo->si_bustype = BUSTYPE_PCI;
@@ -1140,15 +1140,15 @@  static int FlashPoint_ProbeHostAdapter(s
 
 	if (pCardInfo->si_card_model[1] == '3') {
 		if (RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7))
-			pCardInfo->si_flags |= LOW_BYTE_TERM;
+			pCardInfo->si_mflags |= LOW_BYTE_TERM;
 	} else if (pCardInfo->si_card_model[2] == '0') {
 		temp = RD_HARPOON(ioport + hp_xfer_pad);
 		WR_HARPOON(ioport + hp_xfer_pad, (temp & ~BIT(4)));
 		if (RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7))
-			pCardInfo->si_flags |= LOW_BYTE_TERM;
+			pCardInfo->si_mflags |= LOW_BYTE_TERM;
 		WR_HARPOON(ioport + hp_xfer_pad, (temp | BIT(4)));
 		if (RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7))
-			pCardInfo->si_flags |= HIGH_BYTE_TERM;
+			pCardInfo->si_mflags |= HIGH_BYTE_TERM;
 		WR_HARPOON(ioport + hp_xfer_pad, temp);
 	} else {
 		temp = RD_HARPOON(ioport + hp_ee_ctrl);
@@ -1166,9 +1166,9 @@  static int FlashPoint_ProbeHostAdapter(s
 		WR_HARPOON(ioport + hp_ee_ctrl, temp);
 		WR_HARPOON(ioport + hp_xfer_pad, temp2);
 		if (!(temp3 & BIT(7)))
-			pCardInfo->si_flags |= LOW_BYTE_TERM;
+			pCardInfo->si_mflags |= LOW_BYTE_TERM;
 		if (!(temp3 & BIT(6)))
-			pCardInfo->si_flags |= HIGH_BYTE_TERM;
+			pCardInfo->si_mflags |= HIGH_BYTE_TERM;
 	}
 
 	ARAM_ACCESS(ioport);
@@ -1275,7 +1275,7 @@  static void *FlashPoint_HardwareResetHos
 	WR_HARPOON(ioport + hp_arb_id, pCardInfo->si_id);
 	CurrCard->ourId = pCardInfo->si_id;
 
-	i = (unsigned char)pCardInfo->si_flags;
+	i = (unsigned char)pCardInfo->si_mflags;
 	if (i & SCSI_PARITY_ENA)
 		WR_HARPOON(ioport + hp_portctrl_1, (HOST_MODE8 | CHK_SCSI_P));
 
@@ -1289,14 +1289,14 @@  static void *FlashPoint_HardwareResetHos
 		j |= SCSI_TERM_ENA_H;
 	WR_HARPOON(ioport + hp_ee_ctrl, j);
 
-	if (!(pCardInfo->si_flags & SOFT_RESET)) {
+	if (!(pCardInfo->si_mflags & SOFT_RESET)) {
 
 		FPT_sresb(ioport, thisCard);
 
 		FPT_scini(thisCard, pCardInfo->si_id, 0);
 	}
 
-	if (pCardInfo->si_flags & POST_ALL_UNDERRRUNS)
+	if (pCardInfo->si_mflags & POST_ALL_UNDERRRUNS)
 		CurrCard->globalFlags |= F_NO_FILTER;
 
 	if (pCurrNvRam) {