[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190820113657.GV12733@vkoul-mobl.Dlink>
Date: Tue, 20 Aug 2019 17:06:57 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Nathan Huckleberry <nhuck@...gle.com>
Cc: dan.j.williams@...el.com, dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH v2] dmaengine: mv_xor_v2: Fix -Wshift-negative-value
On 13-08-19, 10:34, Nathan Huckleberry wrote:
> Clang produces the following warning
>
> drivers/dma/mv_xor_v2.c:264:40: warning: shifting a negative signed value
> is undefined [-Wshift-negative-value]
> reg &= (~MV_XOR_V2_DMA_IMSG_THRD_MASK <<
> MV_XOR_V2_DMA_IMSG_THRD_SHIFT);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
> drivers/dma/mv_xor_v2.c:271:46: warning: shifting a negative signed value
> is undefined [-Wshift-negative-value]
> reg &= (~MV_XOR_V2_DMA_IMSG_TIMER_THRD_MASK <<
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
>
> Upon further investigation MV_XOR_V2_DMA_IMSG_THRD_SHIFT and
> MV_XOR_V2_DMA_IMSG_TIMER_THRD_SHIFT are both 0. Since shifting by 0 does
> nothing, these variables can be removed.
Applied, thanks
--
~Vinod
Powered by blists - more mailing lists