From: Kalle Valo <kvalo@codeaurora.org>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com,
Nick Desaulniers <ndesaulniers@google.com>,
Nathan Chancellor <natechancellor@gmail.com>
Subject: Re: [PATCH v2] rtw88: Make RA_MASK macros ULL
Date: Thu, 2 May 2019 16:26:58 +0000 (UTC) [thread overview]
Message-ID: <20190502162658.A3E5B6083E@smtp.codeaurora.org> (raw)
In-Reply-To: <20190502150209.4475-1-natechancellor@gmail.com>
Nathan Chancellor <natechancellor@gmail.com> wrote:
> Clang warns about the definitions of these macros (full warnings trimmed
> for brevity):
>
> drivers/net/wireless/realtek/rtw88/main.c:524:15: warning: signed shift
> result (0x3FF00000000) requires 43 bits to represent, but 'int' only has
> 32 bits [-Wshift-overflow]
> ra_mask &= RA_MASK_VHT_RATES | RA_MASK_OFDM_IN_VHT;
> ^~~~~~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw88/main.c:527:15: warning: signed shift
> result (0xFF0000000) requires 37 bits to represent, but 'int' only has
> 32 bits [-Wshift-overflow]
> ra_mask &= RA_MASK_HT_RATES | RA_MASK_OFDM_IN_HT_5G;
> ^~~~~~~~~~~~~~~~
>
> Given that these are all used with ra_mask, which is of type u64, we can
> just declare the macros to be ULL as well.
>
> Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
> Link: https://github.com/ClangBuiltLinux/linux/issues/467
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Patch applied to wireless-drivers-next.git, thanks.
237b47efcdbc rtw88: Make RA_MASK macros ULL
--
https://patchwork.kernel.org/patch/10927105/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2019-05-02 16:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-02 15:00 [PATCH] rtw88: Made RA_MASK macros ULL Nathan Chancellor
2019-05-02 15:02 ` [PATCH v2] rtw88: Make " Nathan Chancellor
2019-05-02 16:26 ` Kalle Valo [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=20190502162658.A3E5B6083E@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=yhchuang@realtek.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