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-prev] [day] [month] [year] [list]
Message-ID:
 <FR3P281MB1757AB30E105E474D1CD64DECE4E2@FR3P281MB1757.DEUP281.PROD.OUTLOOK.COM>
Date: Thu, 24 Oct 2024 12:24:44 +0000
From: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@....com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Jonathan Cameron
	<Jonathan.Cameron@...wei.com>,
        Marius Cristea <marius.cristea@...rochip.com>,
        Trevor Gamblin <tgamblin@...libre.com>,
        Hans de Goede <hdegoede@...hat.com>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH v1 03/13] iio: imu: inv_mpu6050: Replace strange way of
 checking type of enumeration

Hello Andy,

thanks for the patch. I cannot test since I don't have an ACPI system with our sensor, but it looks coherent.

Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@....com>

Best regards,
JB

________________________________________
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Sent: Wednesday, October 23, 2024 17:17
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>; Jonathan Cameron <Jonathan.Cameron@...wei.com>; Marius Cristea <marius.cristea@...rochip.com>; Trevor Gamblin <tgamblin@...libre.com>; Hans de Goede <hdegoede@...hat.com>; linux-iio@...r.kernel.org <linux-iio@...r.kernel.org>; linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>
Cc: Jonathan Cameron <jic23@...nel.org>; Lars-Peter Clausen <lars@...afoo.de>; Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@....com>
Subject: [PATCH v1 03/13] iio: imu: inv_mpu6050: Replace strange way of checking type of enumeration
 
This Message Is From an External Sender
This message came from outside your organization.
 
When device is enumerated via ACPI the respective device node is of
ACPI device type. Use that to check for ACPI enumeration, rather than
calling for full match which is O(n) vs. O(1) for the regular check.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
 drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
index b15d8c94cc11..373e59f6d91a 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
@@ -104,14 +104,11 @@ static int inv_mpu_process_acpi_config(struct i2c_client *client,
 				       unsigned short *secondary_addr)
 {
 	struct acpi_device *adev = ACPI_COMPANION(&client->dev);
-	const struct acpi_device_id *id;
 	u32 i2c_addr = 0;
 	LIST_HEAD(resources);
 	int ret;
 
-	id = acpi_match_device(client->dev.driver->acpi_match_table,
-			       &client->dev);
-	if (!id)
+	if (!is_acpi_device_node(dev_fwnode(&client->dev)))
 		return -ENODEV;
 
 	ret = acpi_dev_get_resources(adev, &resources,
-- 
2.43.0.rc1.1336.g36b5255a03ac


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ