summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2022-04-05 17:15:07 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2022-04-26 05:23:05 +0200
commit331c6e910f1acfcd854428241789431ebed65677 (patch)
treee5ae2c309c1cebddaab339c7f9833a88bbcac358 /drivers
parentscsi: scsi_debug: Add gap zone support (diff)
downloadlinux-331c6e910f1acfcd854428241789431ebed65677.tar.xz
linux-331c6e910f1acfcd854428241789431ebed65677.zip
scsi: aacraid: Fix undefined behavior due to shift overflowing the constant
Fix: drivers/scsi/aacraid/commsup.c: In function ‘aac_handle_sa_aif’: drivers/scsi/aacraid/commsup.c:1983:2: error: case label does not reduce to an integer constant case SA_AIF_BPCFG_CHANGE: ^~~~ See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory details as to why it triggers with older gccs only. Link: https://lore.kernel.org/r/20220405151517.29753-2-bp@alien8.de Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/aacraid/aacraid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index f849e7c9d428..5e115e8b2ba4 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -121,7 +121,7 @@ enum {
#define SA_AIF_PDEV_CHANGE (1<<4)
#define SA_AIF_LDEV_CHANGE (1<<5)
#define SA_AIF_BPSTAT_CHANGE (1<<30)
-#define SA_AIF_BPCFG_CHANGE (1<<31)
+#define SA_AIF_BPCFG_CHANGE (1U<<31)
#define HBA_MAX_SG_EMBEDDED 28
#define HBA_MAX_SG_SEPARATE 90