lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <OS3P286MB06322266ED2913AF0F6172219E609@OS3P286MB0632.JPNP286.PROD.OUTLOOK.COM>
Date:   Fri, 21 Apr 2023 20:54:40 +0800
From:   Yahu Gao <yahu.gao@...look.com>
To:     dlemoal@...nel.org
Cc:     linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
        yahu.gao@...look.com, Yahu Gao <gaoyh12@...ovo.com>,
        Jiwei Sun <sunjw10@...ovo.com>
Subject: [PATCH] drivers/ata: Improve performance and readability

From: Yahu Gao <gaoyh12@...ovo.com>

Replace conditions of avoid issuing [P]IDENTIFY to PMP.

Reviewed-by: Jiwei Sun <sunjw10@...ovo.com>
Signed-off-by: Yahu Gao <gaoyh12@...ovo.com>

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 14c17c3bda4e..53f65d751189 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3802,11 +3802,7 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
 		return -ENODEV;
 
 	/* fail early if !ATA && !ATAPI to avoid issuing [P]IDENTIFY to PMP */
-	if (ata_class_enabled(new_class) &&
-	    new_class != ATA_DEV_ATA &&
-	    new_class != ATA_DEV_ATAPI &&
-	    new_class != ATA_DEV_ZAC &&
-	    new_class != ATA_DEV_SEMB) {
+	if (new_class == ATA_DEV_PMP) {
 		ata_dev_info(dev, "class mismatch %u != %u\n",
 			     dev->class, new_class);
 		rc = -ENODEV;
-- 
2.39.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ