Re: [PATCH 1/2] iio: light: veml3328: remove unused i2c_set_clientdata()

Jonathan Cameron <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <20260726201525.0aec2c28@jic23-huawei>
On Fri, 24 Jul 2026 00:07:08 +0200
Joshua Crofts <[email protected]> wrote:

> The I2C client data is set but never used. Remove the unnecessary
> function call.
Yes it is.  Take another look at how that works and how else the resulting
data is accessed (or just look at Sashiko)

I was hoping it would catch this one :)

The combination of different interfaces to access the same data has
been much debated over time but we never came to a conclusion on whether
it was worth the effort of stopping doing so given i2c driver reviewers
are far too familiar with this particular hole.

J

> 
> No functional change.
> 
> Signed-off-by: Joshua Crofts <[email protected]>
> ---
>  drivers/iio/light/veml3328.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/iio/light/veml3328.c b/drivers/iio/light/veml3328.c
> index 7ff1753925c4..a65748466116 100644
> --- a/drivers/iio/light/veml3328.c
> +++ b/drivers/iio/light/veml3328.c
> @@ -318,7 +318,6 @@ static int veml3328_probe(struct i2c_client *client)
>  		return -ENOMEM;
>  
>  	data = iio_priv(indio_dev);
> -	i2c_set_clientdata(client, indio_dev);
>  
>  	data->regmap = devm_regmap_init_i2c(client, &veml3328_regmap_config);
>  	if (IS_ERR(data->regmap))
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.