lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <C246CAC1457055469EF09E3A7AC4E11A4A5BD930@XAP-PVEXMBX01.xlnx.xilinx.com>
Date:	Wed, 13 Jul 2016 12:00:56 +0000
From:	Appana Durga Kedareswara Rao <appana.durga.rao@...inx.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
CC:	"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
	"vinod.koul@...el.com" <vinod.koul@...el.com>,
	Michal Simek <michals@...inx.com>,
	Soren Brinkmann <sorenb@...inx.com>,
	"arnd@...db.de" <arnd@...db.de>,
	"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] dmaengine: zynqmp_dma: Fix static checker warning

Hi Dan,

	Thanks for the review...

> On Wed, Jul 13, 2016 at 04:12:16PM +0530, Kedareswara rao Appana wrote:
> > diff --git a/drivers/dma/xilinx/zynqmp_dma.c
> > b/drivers/dma/xilinx/zynqmp_dma.c index f777a5b..2248704 100644
> > --- a/drivers/dma/xilinx/zynqmp_dma.c
> > +++ b/drivers/dma/xilinx/zynqmp_dma.c
> > @@ -970,8 +970,13 @@ static int zynqmp_dma_chan_probe(struct
> zynqmp_dma_device *zdev,
> >  	chan->dst_burst_len = ZYNQMP_DMA_AWLEN_RST_VAL;
> >  	chan->src_burst_len = ZYNQMP_DMA_ARLEN_RST_VAL;
> >  	err = of_property_read_u32(node, "xlnx,bus-width", &chan-
> >bus_width);
> > -	if ((err < 0) && ((chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_64) ||
> > -			  (chan->bus_width !=
> ZYNQMP_DMA_BUS_WIDTH_128))) {
> > +	if (err < 0) {
> > +		dev_err(&pdev->dev, "missing xlnx,bus-width property\n");
> > +		return err;
> > +	}
> > +
> > +	if ((chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_64) ||
> 
> This has to be an && because it can never be both widths.  You didn't test this
> patch.  Also too many parenthesis (you're thinking of LISP).

Will fix in the next version...

> 
> > +	    (chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_128)) {
> >  		dev_err(zdev->dev, "invalid bus-width value");
> >  		return err;
> 
> This has to be a negative error code.

Will fix in the next version...

Regards,
Kedar.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ