Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: FlashPoint: Rename si_flags field

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'

Link: https://lore.kernel.org/r/20210529234857.6870-1-rdunlap@infradead.org
Fixes: 391e2f25601e ("[SCSI] BusLogic: Port driver to 64-bit.")
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>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Randy Dunlap and committed by
Martin K. Petersen
4d431153 84a84cc6

+16 -16
+16 -16
drivers/scsi/FlashPoint.c
··· 40 40 u16 si_per_targ_ultra_nego; 41 41 u16 si_per_targ_no_disc; 42 42 u16 si_per_targ_wide_nego; 43 - u16 si_flags; 43 + u16 si_mflags; 44 44 unsigned char si_card_family; 45 45 unsigned char si_bustype; 46 46 unsigned char si_card_model[3]; ··· 1073 1073 ScamFlg = 1074 1074 (unsigned char)FPT_utilEERead(ioport, SCAM_CONFIG / 2); 1075 1075 1076 - pCardInfo->si_flags = 0x0000; 1076 + pCardInfo->si_mflags = 0x0000; 1077 1077 1078 1078 if (i & 0x01) 1079 - pCardInfo->si_flags |= SCSI_PARITY_ENA; 1079 + pCardInfo->si_mflags |= SCSI_PARITY_ENA; 1080 1080 1081 1081 if (!(i & 0x02)) 1082 - pCardInfo->si_flags |= SOFT_RESET; 1082 + pCardInfo->si_mflags |= SOFT_RESET; 1083 1083 1084 1084 if (i & 0x10) 1085 - pCardInfo->si_flags |= EXTENDED_TRANSLATION; 1085 + pCardInfo->si_mflags |= EXTENDED_TRANSLATION; 1086 1086 1087 1087 if (ScamFlg & SCAM_ENABLED) 1088 - pCardInfo->si_flags |= FLAG_SCAM_ENABLED; 1088 + pCardInfo->si_mflags |= FLAG_SCAM_ENABLED; 1089 1089 1090 1090 if (ScamFlg & SCAM_LEVEL2) 1091 - pCardInfo->si_flags |= FLAG_SCAM_LEVEL2; 1091 + pCardInfo->si_mflags |= FLAG_SCAM_LEVEL2; 1092 1092 1093 1093 j = (RD_HARPOON(ioport + hp_bm_ctrl) & ~SCSI_TERM_ENA_L); 1094 1094 if (i & 0x04) { ··· 1104 1104 1105 1105 if (!(RD_HARPOON(ioport + hp_page_ctrl) & NARROW_SCSI_CARD)) 1106 1106 1107 - pCardInfo->si_flags |= SUPPORT_16TAR_32LUN; 1107 + pCardInfo->si_mflags |= SUPPORT_16TAR_32LUN; 1108 1108 1109 1109 pCardInfo->si_card_family = HARPOON_FAMILY; 1110 1110 pCardInfo->si_bustype = BUSTYPE_PCI; ··· 1140 1140 1141 1141 if (pCardInfo->si_card_model[1] == '3') { 1142 1142 if (RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7)) 1143 - pCardInfo->si_flags |= LOW_BYTE_TERM; 1143 + pCardInfo->si_mflags |= LOW_BYTE_TERM; 1144 1144 } else if (pCardInfo->si_card_model[2] == '0') { 1145 1145 temp = RD_HARPOON(ioport + hp_xfer_pad); 1146 1146 WR_HARPOON(ioport + hp_xfer_pad, (temp & ~BIT(4))); 1147 1147 if (RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7)) 1148 - pCardInfo->si_flags |= LOW_BYTE_TERM; 1148 + pCardInfo->si_mflags |= LOW_BYTE_TERM; 1149 1149 WR_HARPOON(ioport + hp_xfer_pad, (temp | BIT(4))); 1150 1150 if (RD_HARPOON(ioport + hp_ee_ctrl) & BIT(7)) 1151 - pCardInfo->si_flags |= HIGH_BYTE_TERM; 1151 + pCardInfo->si_mflags |= HIGH_BYTE_TERM; 1152 1152 WR_HARPOON(ioport + hp_xfer_pad, temp); 1153 1153 } else { 1154 1154 temp = RD_HARPOON(ioport + hp_ee_ctrl); ··· 1166 1166 WR_HARPOON(ioport + hp_ee_ctrl, temp); 1167 1167 WR_HARPOON(ioport + hp_xfer_pad, temp2); 1168 1168 if (!(temp3 & BIT(7))) 1169 - pCardInfo->si_flags |= LOW_BYTE_TERM; 1169 + pCardInfo->si_mflags |= LOW_BYTE_TERM; 1170 1170 if (!(temp3 & BIT(6))) 1171 - pCardInfo->si_flags |= HIGH_BYTE_TERM; 1171 + pCardInfo->si_mflags |= HIGH_BYTE_TERM; 1172 1172 } 1173 1173 1174 1174 ARAM_ACCESS(ioport); ··· 1275 1275 WR_HARPOON(ioport + hp_arb_id, pCardInfo->si_id); 1276 1276 CurrCard->ourId = pCardInfo->si_id; 1277 1277 1278 - i = (unsigned char)pCardInfo->si_flags; 1278 + i = (unsigned char)pCardInfo->si_mflags; 1279 1279 if (i & SCSI_PARITY_ENA) 1280 1280 WR_HARPOON(ioport + hp_portctrl_1, (HOST_MODE8 | CHK_SCSI_P)); 1281 1281 ··· 1289 1289 j |= SCSI_TERM_ENA_H; 1290 1290 WR_HARPOON(ioport + hp_ee_ctrl, j); 1291 1291 1292 - if (!(pCardInfo->si_flags & SOFT_RESET)) { 1292 + if (!(pCardInfo->si_mflags & SOFT_RESET)) { 1293 1293 1294 1294 FPT_sresb(ioport, thisCard); 1295 1295 1296 1296 FPT_scini(thisCard, pCardInfo->si_id, 0); 1297 1297 } 1298 1298 1299 - if (pCardInfo->si_flags & POST_ALL_UNDERRRUNS) 1299 + if (pCardInfo->si_mflags & POST_ALL_UNDERRRUNS) 1300 1300 CurrCard->globalFlags |= F_NO_FILTER; 1301 1301 1302 1302 if (pCurrNvRam) {