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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230702211450.3789779-1-linux@roeck-us.net>
Date:   Sun,  2 Jul 2023 14:14:50 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Joe Perches <joe@...ches.com>
Cc:     Andy Whitcroft <apw@...onical.com>,
        Dwaipayan Ray <dwaipayanray1@...il.com>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>,
        Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org, Guenter Roeck <linux@...ck-us.net>
Subject: [PATCH] checkpatch: Add old hwmon APIs to deprecated list

hwmon_device_register() and [devm_]hwmon_device_register_with_groups()
have been deprecated. All hardware monitoring drivers should use
[devm_]hwmon_device_register_with_info() instead.

The problem with the old API functions is that they require sysfs attribute
handling in driver code. The new API handles sysfs attributes in the
hwmon core. Using the new API typically reduces driver code size by 20-40%.

Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
 scripts/checkpatch.pl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7bfa4d39d17f..6d97f1a6028e 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -842,6 +842,9 @@ our %deprecated_apis = (
 	"kunmap"				=> "kunmap_local",
 	"kmap_atomic"				=> "kmap_local_page",
 	"kunmap_atomic"				=> "kunmap_local",
+	"hwmon_device_register"			=> "hwmon_device_register_with_info",
+	"hwmon_device_register_with_groups"	=> "hwmon_device_register_with_info",
+	"devm_hwmon_device_register_with_groups"=> "devm_hwmon_device_register_with_info",
 );
 
 #Create a search pattern for all these strings to speed up a loop below
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ