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] [thread-next>] [day] [month] [year] [list]
Message-ID: <cdd4c767-1981-49ec-82ff-2fd685f387c5@amd.com>
Date: Mon, 7 Apr 2025 17:01:16 +0530
From: "Gupta, Akshay" <Akshay.Gupta@....com>
To: Arnd Bergmann <arnd@...db.de>, linux-hwmon@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: Guenter Roeck <linux@...ck-us.net>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>, shyam-sundar.s-k@....com,
 gautham.shenoy@....com, Mario Limonciello <mario.limonciello@....com>,
 naveenkrishna.chatradhi@....com, anand.umarji@....com
Subject: Re: [PATCH v7 03/10] misc: amd-sbi: Move hwmon device sensor as
 separate entity


On 4/2/2025 4:33 PM, Arnd Bergmann wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> On Wed, Apr 2, 2025, at 07:58, Akshay Gupta wrote:
>
>> +
>> +int create_hwmon_sensor_device(struct device *dev, struct sbrmi_data *data)
>> +{
>> +     if (IS_REACHABLE(CONFIG_HWMON)) {
>> +             struct device *hwmon_dev;
>> +
>> +             hwmon_dev = devm_hwmon_device_register_with_info(dev, "sbrmi", data,
>> +                                                              &sbrmi_chip_info, NULL);
>> +             return PTR_ERR_OR_ZERO(hwmon_dev);
>> +     }
>> +     return 0;
> I just one more problems with this bit. This was already in the
> existing code, but should still be addressed:
>
> Using IS_REACHABLE() is usually a sign that the Kconfig dependencies
> are wrong. Fix the dependencies instead so the hwmon driver can
> only be enabled if the subsystem is enabled. You can either add a
> separate Kconfig symbol or make the driver 'depends on HWMON || !HWMON'
> to express this.
>
>         Arnd

Thanks Arnd,

I will create a new Kconfig symbol for HWMON changes to enable only when 
subsystem is enabled.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ