]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: aacraid: Fix undefined behavior due to shift overflowing the constant
authorBorislav Petkov <bp@suse.de>
Tue, 5 Apr 2022 15:15:07 +0000 (17:15 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:23:05 +0000 (23:23 -0400)
commit9675e6fd9a20c715d156b5661c3d8917b67203f4
treee5ae2c309c1cebddaab339c7f9833a88bbcac358
parent4ff78cabb8607daa45a9e05d77876afe46368e95
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>
drivers/scsi/aacraid/aacraid.h