mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 05:31:37 -04:00
scsi: hisi_sas: Fix the risk of overflow in bitwise logical operations
Fix a few constants defined via macros that had overflow risks. Signed-off-by: Yihang Li <liyihang9@huawei.com> Link: https://patch.msgid.link/20260305064700.116033-3-liyihang9@huawei.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
87a629fd5e
commit
c420f7c4ac
@@ -432,7 +432,7 @@
|
||||
#define CMPLT_HDR_IPTT_OFF 0
|
||||
#define CMPLT_HDR_IPTT_MSK (0xffff << CMPLT_HDR_IPTT_OFF)
|
||||
#define CMPLT_HDR_DEV_ID_OFF 16
|
||||
#define CMPLT_HDR_DEV_ID_MSK (0xffff << CMPLT_HDR_DEV_ID_OFF)
|
||||
#define CMPLT_HDR_DEV_ID_MSK (0xffffU << CMPLT_HDR_DEV_ID_OFF)
|
||||
/* dw3 */
|
||||
#define SATA_DISK_IN_ERROR_STATUS_OFF 8
|
||||
#define SATA_DISK_IN_ERROR_STATUS_MSK (0x1 << SATA_DISK_IN_ERROR_STATUS_OFF)
|
||||
@@ -444,7 +444,7 @@
|
||||
#define FIS_ATA_STATUS_ERR_OFF 18
|
||||
#define FIS_ATA_STATUS_ERR_MSK (0x1 << FIS_ATA_STATUS_ERR_OFF)
|
||||
#define FIS_TYPE_SDB_OFF 31
|
||||
#define FIS_TYPE_SDB_MSK (0x1 << FIS_TYPE_SDB_OFF)
|
||||
#define FIS_TYPE_SDB_MSK (0x1U << FIS_TYPE_SDB_OFF)
|
||||
|
||||
/* ITCT header */
|
||||
/* qw0 */
|
||||
|
||||
Reference in New Issue
Block a user