linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Manish Narani <manish.narani@xilinx.com>
Cc: <knaack.h@gmx.de>, <lars@metafoo.de>, <pmeerw@pmeerw.net>,
	<michal.simek@xilinx.com>, <linux-iio@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <anirudh@xilinx.com>,
	<sgoud@xilinx.com>
Subject: Re: [PATCH 2/4] iio: adc: xilinx: Remove dead code from xadc_zynq_setup
Date: Sat, 21 Jul 2018 17:22:21 +0100	[thread overview]
Message-ID: <20180721172221.7851fb25@archlinux> (raw)
In-Reply-To: <1531912331-26431-3-git-send-email-manish.narani@xilinx.com>

On Wed, 18 Jul 2018 16:42:09 +0530
Manish Narani <manish.narani@xilinx.com> wrote:

> This patch removes dead code from xadc_zynq_setup. The condition
> "if (tck_rate > XADC_ZYNQ_TCK_RATE_MAX)" cannot be true at any point of
> time. There is also an incompatible parameter used in the code.
> This patch fixes the same reported by coverity.
> 
> Signed-off-by: Manish Narani <manish.narani@xilinx.com>

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to try and break it.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/xilinx-xadc-core.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
> index 27b45df..248cffa 100644
> --- a/drivers/iio/adc/xilinx-xadc-core.c
> +++ b/drivers/iio/adc/xilinx-xadc-core.c
> @@ -341,8 +341,6 @@ static int xadc_zynq_setup(struct platform_device *pdev,
>  
>  	pcap_rate = clk_get_rate(xadc->clk);
>  
> -	if (tck_rate > XADC_ZYNQ_TCK_RATE_MAX)
> -		tck_rate = XADC_ZYNQ_TCK_RATE_MAX;
>  	if (tck_rate > pcap_rate / 2) {
>  		div = 2;
>  	} else {
> @@ -1045,7 +1043,7 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np,
>  	unsigned int num_channels;
>  	const char *external_mux;
>  	u32 ext_mux_chan;
> -	int reg;
> +	u32 reg;
>  	int ret;
>  
>  	*conf = 0;


  reply	other threads:[~2018-07-21 16:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 11:12 [PATCH 0/4] iio: adc: xilinx: XADC driver enhancements and bug fixes Manish Narani
2018-07-18 11:12 ` [PATCH 1/4] iio: adc: xilinx: Rename 'channels' variable name to 'iio_xadc_channels' Manish Narani
2018-07-18 11:18   ` Lars-Peter Clausen
2018-07-18 11:52     ` Manish Narani
2018-07-19  8:22     ` Michal Simek
2018-07-21 16:18       ` Jonathan Cameron
2018-07-21 16:22         ` Joe Perches
2018-07-21 16:33           ` Jonathan Cameron
2018-07-18 11:12 ` [PATCH 2/4] iio: adc: xilinx: Remove dead code from xadc_zynq_setup Manish Narani
2018-07-21 16:22   ` Jonathan Cameron [this message]
2018-07-18 11:12 ` [PATCH 3/4] iio: adc: xilinx: Check for return values in clk related functions Manish Narani
2018-07-19 16:40   ` Lars-Peter Clausen
2018-07-21 16:24     ` Jonathan Cameron
2018-07-23  9:34       ` Manish Narani
2018-07-18 11:12 ` [PATCH 4/4] iio: adc: xilinx: Use devm_ functions while requesting irq Manish Narani
2018-07-19 16:37   ` Lars-Peter Clausen
2018-07-23  9:27     ` Manish Narani

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=20180721172221.7851fb25@archlinux \
    --to=jic23@kernel.org \
    --cc=anirudh@xilinx.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manish.narani@xilinx.com \
    --cc=michal.simek@xilinx.com \
    --cc=pmeerw@pmeerw.net \
    --cc=sgoud@xilinx.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).