Skip to content

Commit ad7c3c0

Browse files
paulmenzelmartinkpetersen
authored andcommitted
scsi: mpt3sas: Set ioc->manu_pg11.EEDPTagMode directly to 1
Currently, the code does: if (x == 0) { x &= ~0x3; x |= 0x1; } Zeroing bits 0 and 1 of a variable that is 0 is not necessary. So directly set the variable to 1. Cc: Sreekanth Reddy <[email protected]> Fixes: f92363d ("[SCSI] mpt3sas: add new driver supporting 12GB SAS") Signed-off-by: Paul Menzel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 09ecc18 commit ad7c3c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/scsi/mpt3sas/mpt3sas_base.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5629,8 +5629,7 @@ _base_static_config_pages(struct MPT3SAS_ADAPTER *ioc)
56295629
if (!ioc->is_gen35_ioc && ioc->manu_pg11.EEDPTagMode == 0) {
56305630
pr_err("%s: overriding NVDATA EEDPTagMode setting from 0 to 1\n",
56315631
ioc->name);
5632-
ioc->manu_pg11.EEDPTagMode &= ~0x3;
5633-
ioc->manu_pg11.EEDPTagMode |= 0x1;
5632+
ioc->manu_pg11.EEDPTagMode = 0x1;
56345633
mpt3sas_config_set_manufacturing_pg11(ioc, &mpi_reply,
56355634
&ioc->manu_pg11);
56365635
}

0 commit comments

Comments
 (0)