Skip to content

Commit 331c6e9

Browse files
suryasaimadhumartinkpetersen
authored andcommitted
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>
1 parent 4a5fc1c commit 331c6e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/aacraid/aacraid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ enum {
121121
#define SA_AIF_PDEV_CHANGE (1<<4)
122122
#define SA_AIF_LDEV_CHANGE (1<<5)
123123
#define SA_AIF_BPSTAT_CHANGE (1<<30)
124-
#define SA_AIF_BPCFG_CHANGE (1<<31)
124+
#define SA_AIF_BPCFG_CHANGE (1U<<31)
125125

126126
#define HBA_MAX_SG_EMBEDDED 28
127127
#define HBA_MAX_SG_SEPARATE 90

0 commit comments

Comments
 (0)