Skip to content

Commit

Permalink
scsi: aacraid: Fix undefined behavior due to shift overflowing the co…
Browse files Browse the repository at this point in the history
…nstant

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%[email protected] for the gory
details as to why it triggers with older gccs only.

Link: https://lore.kernel.org/r/[email protected]
Cc: Adaptec OEM Raid Solutions <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
Reviewed-by: Randy Dunlap <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
suryasaimadhu authored and martinkpetersen committed Apr 26, 2022
1 parent 4a5fc1c commit 331c6e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/aacraid/aacraid.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 331c6e9

Please sign in to comment.