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: <20211008134705.GA1215575@roeck-us.net>
Date:   Fri, 8 Oct 2021 06:47:05 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Zev Weiss <zev@...ilderbeest.net>
Cc:     Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/8] hwmon: (pmbus/lm25066) Avoid forward declaration of
 lm25066_id

On Tue, Sep 28, 2021 at 02:22:37AM -0700, Zev Weiss wrote:
> Reordering things to put the table before the probe function
> eliminates the need for it.
> 
> Signed-off-by: Zev Weiss <zev@...ilderbeest.net>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/pmbus/lm25066.c | 23 ++++++++++-------------
>  1 file changed, 10 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c
> index 3616705aafde..4dc003ff859e 100644
> --- a/drivers/hwmon/pmbus/lm25066.c
> +++ b/drivers/hwmon/pmbus/lm25066.c
> @@ -234,8 +234,6 @@ struct lm25066_data {
>  
>  #define to_lm25066_data(x)  container_of(x, struct lm25066_data, info)
>  
> -static const struct i2c_device_id lm25066_id[];
> -
>  static int lm25066_read_word_data(struct i2c_client *client, int page,
>  				  int phase, int reg)
>  {
> @@ -436,6 +434,16 @@ static int lm25066_write_word_data(struct i2c_client *client, int page, int reg,
>  	return ret;
>  }
>  
> +static const struct i2c_device_id lm25066_id[] = {
> +	{"lm25056", lm25056},
> +	{"lm25066", lm25066},
> +	{"lm5064", lm5064},
> +	{"lm5066", lm5066},
> +	{"lm5066i", lm5066i},
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(i2c, lm25066_id);
> +
>  static int lm25066_probe(struct i2c_client *client)
>  {
>  	int config;
> @@ -509,17 +517,6 @@ static int lm25066_probe(struct i2c_client *client)
>  	return pmbus_do_probe(client, info);
>  }
>  
> -static const struct i2c_device_id lm25066_id[] = {
> -	{"lm25056", lm25056},
> -	{"lm25066", lm25066},
> -	{"lm5064", lm5064},
> -	{"lm5066", lm5066},
> -	{"lm5066i", lm5066i},
> -	{ }
> -};
> -
> -MODULE_DEVICE_TABLE(i2c, lm25066_id);
> -
>  /* This is the driver that will be inserted */
>  static struct i2c_driver lm25066_driver = {
>  	.driver = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ