forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Wshift-overflow in drivers/net/wireless/realtek/rtw88/main.c #467
Labels
-Wshift-overflow
[BUG] linux-next
This is an issue only seen in linux-next
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
Comments
nathanchance
added
-Wshift-overflow
[BUG] linux-next
This is an issue only seen in linux-next
labels
May 1, 2019
This should be the proper fix I think: https://gist.github.com/51de646110177fb0f13233955231751b |
nathanchance
added
[PATCH] Accepted
A submitted patch has been accepted upstream
and removed
[PATCH] Submitted
A patch has been submitted for review
labels
May 2, 2019
fengguang
pushed a commit
to 0day-ci/linux
that referenced
this issue
May 3, 2019
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: e303748 ("rtw88: new Realtek 802.11ac driver") Link: ClangBuiltLinux#467 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Fixed as of next-20190503: https://git.kernel.org/next/linux-next/c/237b47efcdbc019ccd094ad8b87847dc6fc7fda7 |
nathanchance
added
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
and removed
[PATCH] Accepted
A submitted patch has been accepted upstream
labels
May 3, 2019
jason77-wang
pushed a commit
to jason77-wang/oem
that referenced
this issue
Jun 18, 2019
BugLink: https://bugs.launchpad.net/bugs/1831828 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: ClangBuiltLinux/linux#467 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> (cherry picked from commit 237b47efcdbc019ccd094ad8b87847dc6fc7fda7) Signed-off-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
jason77-wang
pushed a commit
to jason77-wang/oem
that referenced
this issue
Jun 24, 2019
BugLink: https://bugs.launchpad.net/bugs/1831828 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: ClangBuiltLinux/linux#467 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> (cherry picked from commit 237b47efcdbc019ccd094ad8b87847dc6fc7fda7) Signed-off-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
jason77-wang
pushed a commit
to jason77-wang/oem
that referenced
this issue
Jul 5, 2019
BugLink: https://bugs.launchpad.net/bugs/1831828 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: ClangBuiltLinux/linux#467 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> (cherry picked from commit 237b47efcdbc019ccd094ad8b87847dc6fc7fda7) Signed-off-by: Aaron Ma <aaron.ma@canonical.com> Acked-by: AceLan Kao <acelan.kao@canonical.com> Acked-by: Hui Wang <hui.wang@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fcicq
pushed a commit
to fcicq/chromiumos-third_party-kernel
that referenced
this issue
Jul 17, 2019
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: e303748 ("rtw88: new Realtek 802.11ac driver") Link: ClangBuiltLinux/linux#467 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> (cherry picked from commit 237b47e) BUG=b:124400293 TEST=compile with -Wshift-overflow Change-Id: I3c7f2fdee9d394850e9983fefaa541c1b2a5898d Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1679950 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Sean Paul <seanpaul@chromium.org>
starnight
pushed a commit
to endlessm/linux
that referenced
this issue
Jul 17, 2019
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: e303748 ("rtw88: new Realtek 802.11ac driver") Link: ClangBuiltLinux/linux#467 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
pkshih
pushed a commit
to rtlwifi-linux/rtw88_8723de
that referenced
this issue
Aug 28, 2019
Clang warns about the definitions of these macros (full warnings trimmed for brevity): 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; ^~~~~~~~~~~~~~~~~ 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: ClangBuiltLinux/linux#467 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
fcicq
pushed a commit
to fcicq/chromiumos-third_party-kernel
that referenced
this issue
Aug 30, 2019
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: e303748 ("rtw88: new Realtek 802.11ac driver") Link: ClangBuiltLinux/linux#467 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> (cherry picked from commit 237b47e) BUG=b:124400293 TEST=compile with -Wshift-overflow Change-Id: I3c7f2fdee9d394850e9983fefaa541c1b2a5898d Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1679950 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1777150
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
-Wshift-overflow
[BUG] linux-next
This is an issue only seen in linux-next
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
The text was updated successfully, but these errors were encountered: