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>,
Silvan Murer <silvan.murer@gmail.com>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: dac: remove redundant pointer chip_info and spi_dev_id
Date: Sat, 07 Jul 2018 16:47:40 +0000 [thread overview]
Message-ID: <20180707174740.47c25742@archlinux> (raw)
In-Reply-To: <20180702101359.16461-1-colin.king@canonical.com>
On Mon, 2 Jul 2018 11:13:59 +0100
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointers chip_info and spi_dev_id are being assigned but are never used
> hence they are redundant and can be removed.
>
> Cleans up clang warning:
> warning: variable 'chip_info' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Huh, I wonder how we ended up with that being left behind?
Not that I wonder enough to actually look ;)
Thanks and good to get rid of these 'interesting'
corners :)
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/dac/ltc2632.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c
> index cca278eaa138..28e9b7656b20 100644
> --- a/drivers/iio/dac/ltc2632.c
> +++ b/drivers/iio/dac/ltc2632.c
> @@ -87,12 +87,7 @@ static int ltc2632_read_raw(struct iio_dev *indio_dev,
> int *val2,
> long m)
> {
> - struct ltc2632_chip_info *chip_info;
> -
> const struct ltc2632_state *st = iio_priv(indio_dev);
> - const struct spi_device_id *spi_dev_id = spi_get_device_id(st->spi_dev);
> -
> - chip_info = (struct ltc2632_chip_info *)spi_dev_id->driver_data;
>
> switch (m) {
> case IIO_CHAN_INFO_SCALE:
prev parent reply other threads:[~2018-07-07 16:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 10:13 [PATCH] iio: dac: remove redundant pointer chip_info and spi_dev_id Colin King
2018-07-07 16:47 ` 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=20180707174740.47c25742@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=pmeerw@pmeerw.net \
--cc=silvan.murer@gmail.com \
/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).