lkml.org 
[lkml]   [2019]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-08-20 13:38    [W:0.096 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site