Re: [PATCH 2/2] scsi: mpt3sas: Set ioc->manu_pg11.EEDPTagMode directly to 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Remove non-working @lsi.com addresses]

Am 12.12.24 um 23:18 schrieb Paul Menzel:
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 <sreekanth.reddy@xxxxxxxxxxxx>
Fixes: f92363d12359 ("[SCSI] mpt3sas: add new driver supporting 12GB SAS")
Signed-off-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
---
  drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 87fcafce947c..2cd0bb606d88 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -5629,8 +5629,7 @@ _base_static_config_pages(struct MPT3SAS_ADAPTER *ioc)
  	if (!ioc->is_gen35_ioc && ioc->manu_pg11.EEDPTagMode == 0) {
  		pr_err("%s: overriding NVDATA EEDPTagMode setting from 0 to 1.\n",
  		    ioc->name);
-		ioc->manu_pg11.EEDPTagMode &= ~0x3;
-		ioc->manu_pg11.EEDPTagMode |= 0x1;
+		ioc->manu_pg11.EEDPTagMode = 0x1;
  		mpt3sas_config_set_manufacturing_pg11(ioc, &mpi_reply,
  		    &ioc->manu_pg11);
  	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux