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: <4856f639-5b44-47cc-a257-47a30ad3fb5c@roeck-us.net>
Date: Tue, 19 Nov 2024 06:48:31 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: JuenKit Yip <hunterteaegg@....com>, robh@...nel.org, krzk+dt@...nel.org,
 conor+dt@...nel.org, jdelvare@...e.com, peteryin.openbmc@...il.com,
 noahwang.wang@...look.com, festevam@...il.com, marex@...x.de,
 lukas@...ner.de, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-hwmon@...r.kernel.org
Subject: Re: [PATCH 1/2] hwmon: (sht3x) add devicetree support

On 11/19/24 06:07, JuenKit Yip wrote:
> add "compatible" property for supporting devicetree
> 
> Signed-off-by: JuenKit Yip <hunterteaegg@....com>
> ---
>   drivers/hwmon/sht3x.c | 18 +++++++++++++++++-
>   1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/sht3x.c b/drivers/hwmon/sht3x.c
> index 650b0bcc2359..2ac1537b3e3e 100644
> --- a/drivers/hwmon/sht3x.c
> +++ b/drivers/hwmon/sht3x.c
> @@ -954,6 +954,19 @@ static int sht3x_probe(struct i2c_client *client)
>   	return PTR_ERR_OR_ZERO(hwmon_dev);
>   }
>   
> +/* devicetree ID table */
> +static const struct of_device_id sht3x_of_match[] = {
> +	{ .compatible = "sensirion,sht30", .data = (void *)sht3x },
> +	{ .compatible = "sensirion,sht31", .data = (void *)sht3x },
> +	{ .compatible = "sensirion,sht35", .data = (void *)sht3x },
> +	{ .compatible = "sensirion,sts30", .data = (void *)sts3x },
> +	{ .compatible = "sensirion,sts31", .data = (void *)sts3x },
> +	{ .compatible = "sensirion,sts35", .data = (void *)sts3x },

This either needs to be "sensirion,sht3x" and "sensirion,sts3x",
and the matching entries need to be documented in the bindings document,
or each individual entry needs to be listed in the bindings document.
Also, this patch should be patch 2/2, and it needs to pass checkpatch
without warning.

> +	{},

Unnecessary ",".

Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ