linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SCSI: FlashPoint: rename si_flags field
@ 2021-05-29 23:48 Randy Dunlap
  2021-05-30  8:10 ` Hannes Reinecke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-05-29 23:48 UTC (permalink / raw)
  To: linux-scsi
  Cc: Randy Dunlap, kernel test robot, James E.J. Bottomley,
	Martin K. Petersen, Christoph Hellwig, Jens Axboe,
	Hannes Reinecke, Khalid Aziz, Khalid Aziz

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(-)

--- 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) {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] SCSI: FlashPoint: rename si_flags field
  2021-05-29 23:48 [PATCH] SCSI: FlashPoint: rename si_flags field Randy Dunlap
@ 2021-05-30  8:10 ` Hannes Reinecke
  2021-06-02  3:25 ` Martin K. Petersen
  2021-06-08  3:05 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2021-05-30  8:10 UTC (permalink / raw)
  To: Randy Dunlap, linux-scsi
  Cc: kernel test robot, James E.J. Bottomley, Martin K. Petersen,
	Christoph Hellwig, Jens Axboe, Khalid Aziz, Khalid Aziz

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] SCSI: FlashPoint: rename si_flags field
  2021-05-29 23:48 [PATCH] SCSI: FlashPoint: rename si_flags field Randy Dunlap
  2021-05-30  8:10 ` Hannes Reinecke
@ 2021-06-02  3:25 ` Martin K. Petersen
  2021-06-08  3:05 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-06-02  3:25 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-scsi, kernel test robot, James E.J. Bottomley,
	Martin K. Petersen, Christoph Hellwig, Jens Axboe,
	Hannes Reinecke, Khalid Aziz, Khalid Aziz


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] SCSI: FlashPoint: rename si_flags field
  2021-05-29 23:48 [PATCH] SCSI: FlashPoint: rename si_flags field Randy Dunlap
  2021-05-30  8:10 ` Hannes Reinecke
  2021-06-02  3:25 ` Martin K. Petersen
@ 2021-06-08  3:05 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-06-08  3:05 UTC (permalink / raw)
  To: linux-scsi, Randy Dunlap
  Cc: Martin K . Petersen, Khalid Aziz, Jens Axboe, Hannes Reinecke,
	Khalid Aziz, kernel test robot, James E.J. Bottomley,
	Christoph Hellwig

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-08  3:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-29 23:48 [PATCH] SCSI: FlashPoint: rename si_flags field Randy Dunlap
2021-05-30  8:10 ` Hannes Reinecke
2021-06-02  3:25 ` Martin K. Petersen
2021-06-08  3:05 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).