Kernel-Janitors Archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: light: gp2ap020a00f: Remove some unused field in struct gp2ap020a00f_data
@ 2024-05-01 12:55 Christophe JAILLET
  2024-05-04 11:44 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2024-05-01 12:55 UTC (permalink / raw
  To: Jonathan Cameron, Lars-Peter Clausen
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-iio

In "struct gp2ap020a00f_data", the 'pdata' field is unused.

Moreover the "struct gp2ap020a00f_platform_data" is defined nowhere.
Neither in this file, nor in a global .h file, so it is completely
pointless.

So, remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only.

It was added in the initial commit bf29fbeaa13d ("iio: gp2ap020a00f: Add a
driver for the device") but was never used.
---
 drivers/iio/light/gp2ap020a00f.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/light/gp2ap020a00f.c b/drivers/iio/light/gp2ap020a00f.c
index 9f41724819b6..9a476697aa1f 100644
--- a/drivers/iio/light/gp2ap020a00f.c
+++ b/drivers/iio/light/gp2ap020a00f.c
@@ -237,7 +237,6 @@ enum gp2ap020a00f_thresh_val_id {
 };
 
 struct gp2ap020a00f_data {
-	const struct gp2ap020a00f_platform_data *pdata;
 	struct i2c_client *client;
 	struct mutex lock;
 	char *buffer;
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: light: gp2ap020a00f: Remove some unused field in struct gp2ap020a00f_data
  2024-05-01 12:55 [PATCH] iio: light: gp2ap020a00f: Remove some unused field in struct gp2ap020a00f_data Christophe JAILLET
@ 2024-05-04 11:44 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2024-05-04 11:44 UTC (permalink / raw
  To: Christophe JAILLET
  Cc: Lars-Peter Clausen, linux-kernel, kernel-janitors, linux-iio

On Wed,  1 May 2024 14:55:17 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:

> In "struct gp2ap020a00f_data", the 'pdata' field is unused.
> 
> Moreover the "struct gp2ap020a00f_platform_data" is defined nowhere.
> Neither in this file, nor in a global .h file, so it is completely
> pointless.
> 
> So, remove it.
> 
> Found with cppcheck, unusedStructMember.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to the togreg branch of iio.git and pushed out as testing to let
the bots play with it.

Note I'll be rebasing that tree on rc1 once available.

Thanks,

Jonathan

> ---
> Compile tested only.
> 
> It was added in the initial commit bf29fbeaa13d ("iio: gp2ap020a00f: Add a
> driver for the device") but was never used.
> ---
>  drivers/iio/light/gp2ap020a00f.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/iio/light/gp2ap020a00f.c b/drivers/iio/light/gp2ap020a00f.c
> index 9f41724819b6..9a476697aa1f 100644
> --- a/drivers/iio/light/gp2ap020a00f.c
> +++ b/drivers/iio/light/gp2ap020a00f.c
> @@ -237,7 +237,6 @@ enum gp2ap020a00f_thresh_val_id {
>  };
>  
>  struct gp2ap020a00f_data {
> -	const struct gp2ap020a00f_platform_data *pdata;
>  	struct i2c_client *client;
>  	struct mutex lock;
>  	char *buffer;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-04 11:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01 12:55 [PATCH] iio: light: gp2ap020a00f: Remove some unused field in struct gp2ap020a00f_data Christophe JAILLET
2024-05-04 11:44 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).