RE: [bug report] dmaengine: Add Xilinx zynqmp dma engine driver support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

	Thanks for reporting the issue...

> 
> Hello Kedareswara rao Appana,
> 
> The patch b0cc417c1637: "dmaengine: Add Xilinx zynqmp dma engine driver
> support" from Jul 1, 2016, leads to the following static checker warning:
> 
> 	drivers/dma/xilinx/zynqmp_dma.c:973 zynqmp_dma_chan_probe()
> 	warn: was && intended here instead of ||?
> 
> drivers/dma/xilinx/zynqmp_dma.c
>    968
>    969          chan->bus_width = ZYNQMP_DMA_BUS_WIDTH_64;
>    970          chan->dst_burst_len = ZYNQMP_DMA_AWLEN_RST_VAL;
>    971          chan->src_burst_len = ZYNQMP_DMA_ARLEN_RST_VAL;
>    972          err = of_property_read_u32(node, "xlnx,bus-width", &chan-
> >bus_width);
>    973          if ((err < 0) && ((chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_64)
> ||
>    974                            (chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_128))) {
> 
> This is a really confusing if statement.  It's obviously wrong, but it's not clear
> what was intended.  Perhaps:

Controller supports only the bus-width values of 64 and 128 that's why putted check like above.

> 
> 		if (err)
> 			return err;
> 
> 		if (chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_64 &&
> 		    chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_128) {
> 			dev_err(zdev->dev, "invalid bus-width value");
> 			return -EINVAL;
> 		}

Ok sure will fix and will send a patch as you suggested...

Regards,
Kedar.

> 
> 
>    975                  dev_err(zdev->dev, "invalid bus-width value");
>    976                  return err;
>    977          }
> 
> regards,
> dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux