Linux-IIO Archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: light: gp2ap020a00f: Remove some unused field in struct gp2ap020a00f_data
Date: Sat, 4 May 2024 12:44:07 +0100	[thread overview]
Message-ID: <20240504124407.1ac6f07e@jic23-huawei> (raw)
In-Reply-To: <57e9f29c7062d1bb846064bf6dbd7a8385a855e7.1714568099.git.christophe.jaillet@wanadoo.fr>

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;


      reply	other threads:[~2024-05-04 11:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240504124407.1ac6f07e@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).