[PATCH] dmaengine: imx-sdma: Fix: Remove 'always true' comparison

Vinod Koul vkoul at kernel.org
Wed Jun 24 01:46:01 EDT 2020


On 21-06-20, 12:57, Fabio Estevam wrote:
> event_id0 is defined as 'unsigned int', so it is always greater or
> equal to zero.
> 
> Remove the unneeded comparisons to fix the following W=1 build
> warning:
> 
> drivers/dma/imx-sdma.c: In function 'sdma_free_chan_resources':
> drivers/dma/imx-sdma.c:1334:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
> 1334 |  if (sdmac->event_id0 >= 0)
> |                       ^~
> drivers/dma/imx-sdma.c: In function 'sdma_config':
> drivers/dma/imx-sdma.c:1635:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
> 1635 |  if (sdmac->event_id0 >= 0) {
> |               

Applied, thanks

-- 
~Vinod



More information about the linux-arm-kernel mailing list