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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71bc00d1-217a-485a-a238-f057d2aa112b@roeck-us.net>
Date: Wed, 8 Jan 2025 06:22:22 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@...log.com>,
 devicetree@...r.kernel.org, linux-hwmon@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Cc: Jean Delvare <jdelvare@...e.com>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Jonathan Corbet <corbet@....net>
Subject: Re: [PATCH 1/3] hwmon: (max31827) refactor enum chips to chip info

On 1/8/25 00:25, John Erasmus Mari Geronimo wrote:
> Utilized chip info to replace enum chips to cater similar devices with
> different configurations.
> 
> Signed-off-by: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@...log.com>
> ---
>   drivers/hwmon/max31827.c | 86 ++++++++++++++++++++--------------------
>   1 file changed, 43 insertions(+), 43 deletions(-)
> 
> diff --git a/drivers/hwmon/max31827.c b/drivers/hwmon/max31827.c
> index 48e8f8ba4..5d319d401 100644
> --- a/drivers/hwmon/max31827.c
> +++ b/drivers/hwmon/max31827.c
> @@ -47,12 +47,6 @@
>   #define MAX31827_M_DGR_TO_16_BIT(x)	(((x) << 4) / 1000)
>   #define MAX31827_DEVICE_ENABLE(x)	((x) ? 0xA : 0x0)
>   
> -/*
> - * The enum passed in the .data pointer of struct of_device_id must
> - * start with a value != 0 since that is a requirement for using
> - * device_get_match_data().
> - */
> -enum chips { max31827 = 1, max31828, max31829 };
>   
>   enum max31827_cnv {
>   	MAX31827_CNV_1_DIV_64_HZ = 1,
> @@ -95,6 +89,17 @@ static const u16 max31827_conv_times[] = {
>   	[MAX31827_RES_12_BIT] = MAX31827_12_BIT_CNV_TIME,
>   };
>   
> +struct max31827_state;
> +static const struct max31827_chip_info max31827;
> +static const struct max31827_chip_info max31828;
> +static const struct max31827_chip_info max31829;
> +static const struct max31827_chip_info max31875;
> +

 From Documentation/hwmon/submitting-patches.rst:

* Avoid forward declarations if you can. Rearrange the code if necessary.

Please follow that guidance.

Thanks,
Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ