linux/drivers/scsi/bnx2fc
Colin Ian King d0c0d90233 scsi: bnx2fc: fix incorrect cast to u64 on shift operation
Currently an int is being shifted and the result is being cast to a u64
which leads to undefined behaviour if the shift is more than 31 bits. Fix
this by casting the integer value 1 to u64 before the shift operation.

Addresses-Coverity: ("Bad shift operation")
Fixes: 7b59476912 ("[SCSI] bnx2fc: Handle REC_TOV error code from firmware")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-05-20 10:56:43 -04:00
..
57xx_hsi_bnx2fc.h scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_constants.h scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_debug.c scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_debug.h scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_els.c scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_fcoe.c scsi: fcoe: make use of fip_mode enum complete 2019-02-19 18:58:38 -05:00
bnx2fc_hwi.c scsi: bnx2fc: fix incorrect cast to u64 on shift operation 2019-05-20 10:56:43 -04:00
bnx2fc_io.c scsi: bnx2fc: remove unneeded variable 2019-04-03 23:11:35 -04:00
bnx2fc_tgt.c cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
bnx2fc.h scsi: bnx2fc: remove obsolete bnx2fc_eh_host_reset() definition 2017-08-25 17:21:12 -04:00
Kconfig bnx2fc: Remove 'NetXtreme II' from source files. 2015-11-09 17:29:04 -08:00
Makefile