From: Jonathan Cameron <jic23@kernel.org>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Murilo Opsfelder Araujo <mopsfelder@gmail.com>,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: iio: accel: sca3000_core.c: Remove unused function
Date: Fri, 26 Dec 2014 12:40:47 +0000 [thread overview]
Message-ID: <549D574F.6010700@kernel.org> (raw)
In-Reply-To: <1419087187-4250-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On 20/12/14 14:53, Rickard Strandqvist wrote:
> Remove the function sca3000_check_status() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Applied to the togreg branch of iio.git - initially pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/staging/iio/accel/sca3000_core.c | 27 ---------------------------
> 1 file changed, 27 deletions(-)
>
> diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c
> index e4e5639..655e34c 100644
> --- a/drivers/staging/iio/accel/sca3000_core.c
> +++ b/drivers/staging/iio/accel/sca3000_core.c
> @@ -223,33 +223,6 @@ error_ret:
> return ret;
> }
>
> -#ifdef SCA3000_DEBUG
> -/**
> - * sca3000_check_status() check the status register
> - *
> - * Only used for debugging purposes
> - **/
> -static int sca3000_check_status(struct device *dev)
> -{
> - int ret;
> - struct iio_dev *indio_dev = dev_to_iio_dev(dev);
> - struct sca3000_state *st = iio_priv(indio_dev);
> -
> - mutex_lock(&st->lock);
> - ret = sca3000_read_data_short(st, SCA3000_REG_ADDR_STATUS, 1);
> - if (ret < 0)
> - goto error_ret;
> - if (st->rx[0] & SCA3000_EEPROM_CS_ERROR)
> - dev_err(dev, "eeprom error\n");
> - if (st->rx[0] & SCA3000_SPI_FRAME_ERROR)
> - dev_err(dev, "Previous SPI Frame was corrupt\n");
> -
> -error_ret:
> - mutex_unlock(&st->lock);
> - return ret;
> -}
> -#endif /* SCA3000_DEBUG */
> -
> /**
> * sca3000_show_rev() - sysfs interface to read the chip revision number
> **/
>
prev parent reply other threads:[~2014-12-26 12:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-20 14:53 [PATCH] staging: iio: accel: sca3000_core.c: Remove unused function Rickard Strandqvist
2014-12-26 12:40 ` 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=549D574F.6010700@kernel.org \
--to=jic23@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mopsfelder@gmail.com \
--cc=pmeerw@pmeerw.net \
--cc=rickard_strandqvist@spectrumdigital.se \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.