]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: mpt3sas: Set ioc->manu_pg11.EEDPTagMode directly to 1
authorPaul Menzel <pmenzel@molgen.mpg.de>
Thu, 12 Dec 2024 22:18:12 +0000 (23:18 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 2 Jan 2025 18:44:39 +0000 (13:44 -0500)
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@broadcom.com>
Fixes: f92363d12359 ("[SCSI] mpt3sas: add new driver supporting 12GB SAS")
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Link: https://lore.kernel.org/r/20241212221817.78940-2-pmenzel@molgen.mpg.de
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c

index d276a654d9c7bc6c293026c18937e5504e65e00e..69dc0084eb7f3331c528f2b60969c75b3f9d322c 100644 (file)
@@ -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);
        }