From: Vinod Koul <vkoul@kernel.org>
To: Nathan Huckleberry <nhuck@google.com>
Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH v2] dmaengine: mv_xor_v2: Fix -Wshift-negative-value
Date: Tue, 20 Aug 2019 17:06:57 +0530 [thread overview]
Message-ID: <20190820113657.GV12733@vkoul-mobl.Dlink> (raw)
In-Reply-To: <20190813173448.109859-1-nhuck@google.com>
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
prev parent reply other threads:[~2019-08-20 11:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 22:54 [PATCH] dmaengine: mv_xor_v2: Fix -Wshift-negative-value Nathan Huckleberry
2019-06-12 23:14 ` Nick Desaulniers
2019-08-13 17:34 ` [PATCH v2] " Nathan Huckleberry
2019-08-13 20:43 ` Nick Desaulniers
2019-08-20 11:36 ` Vinod Koul [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190820113657.GV12733@vkoul-mobl.Dlink \
--to=vkoul@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nhuck@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).