From: Jonathan Cameron <jic23@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: accel: remove redundant pointer pdata
Date: Sat, 25 Nov 2017 16:44:19 +0000 [thread overview]
Message-ID: <20171125164419.65e41413@archlinux> (raw)
In-Reply-To: <20171122143211.30651-1-colin.king@canonical.com>
On Wed, 22 Nov 2017 14:32:11 +0000
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer pdata is being assigned but it is never being used, hence
> it is redundant and can be removed. Cleans up clang warning:
>
> drivers/iio/accel/st_accel_core.c:952:3: warning: Value stored to 'pdata'
> is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied to the togreg branch of iio.git and pushed out as testing.
Thanks,
Jonathan
> ---
> drivers/iio/accel/st_accel_core.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
> index 460aa58e0159..6fe995cf16a6 100644
> --- a/drivers/iio/accel/st_accel_core.c
> +++ b/drivers/iio/accel/st_accel_core.c
> @@ -920,8 +920,6 @@ static const struct iio_trigger_ops st_accel_trigger_ops = {
> int st_accel_common_probe(struct iio_dev *indio_dev)
> {
> struct st_sensor_data *adata = iio_priv(indio_dev);
> - struct st_sensors_platform_data *pdata =
> - (struct st_sensors_platform_data *)adata->dev->platform_data;
> int irq = adata->get_irq_data_ready(indio_dev);
> int err;
>
> @@ -948,9 +946,6 @@ int st_accel_common_probe(struct iio_dev *indio_dev)
> &adata->sensor_settings->fs.fs_avl[0];
> adata->odr = adata->sensor_settings->odr.odr_avl[0].hz;
>
> - if (!pdata)
> - pdata = (struct st_sensors_platform_data *)&default_accel_pdata;
> -
> err = st_sensors_init_sensor(indio_dev, adata->dev->platform_data);
> if (err < 0)
> goto st_accel_power_off;
prev parent reply other threads:[~2017-11-25 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 14:32 [PATCH] iio: accel: remove redundant pointer pdata Colin King
2017-11-25 16: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=20171125164419.65e41413@archlinux \
--to=jic23@kernel.org \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=pmeerw@pmeerw.net \
/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 NNTP newsgroup(s).