Wimplicit-fallthrough patches for 5.3-rc2
Hi Linus,
Kees let me know about the problems you had with my previous pull-request. Apologies for the inconvenience.
Here is a new pull-request that includes a fix for those warnings you were seeing with the dcn20_dccg driver.
Just for you to know, I'm building allmodconfig.
Please, let me know if you have any trouble and I'll address it ASAP.
Thanks!
--
Gustavo
The following changes since commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b:
Linus 5.3-rc1 (2019-07-21 14:05:38 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git tags/Wimplicit-fallthrough-5.3-rc2
for you to fetch changes up to a035d552a93bb9ef6048733bb9f2a0dc857ff869:
Makefile: Globally enable fall-through warning (2019-07-25 20:13:54 -0500)
----------------------------------------------------------------
Wimplicit-fallthrough patches for 5.3-rc2
Hi Linus,
Please, pull the following patches that mark switch cases where we are expecting to fall through. These patches are part of the ongoing efforts to enable -Wimplicit-fallthrough. Most of them have been baking in linux-next for a whole development cycle.
Also, pull the Makefile patch that globally enables the -Wimplicit-fallthrough option.
Finally, some missing-break fixes that have been tagged for -stable:
- drm/amdkfd: Fix missing break in switch statement
- drm/amdgpu/gfx10: Fix missing break in switch statement
Notice that with these changes, we completely get rid of all the fall-through warnings in the kernel.
Thanks
----------------------------------------------------------------
Gustavo A. R. Silva (12):
firewire: mark expected switch fall-throughs
can: mark expected switch fall-throughs
afs: yfsclient: Mark expected switch fall-throughs
afs: fsclient: Mark expected switch fall-throughs
mtd: onenand_base: Mark expected switch fall-through perf/x86/intel: Mark expected switch fall-throughs drm/amdkfd: Fix missing break in switch statement drm/amdgpu/gfx10: Fix missing break in switch statement drm/amdkfd/kfd_mqd_manager_v10: Avoid fall-through warning drm/amd/display: Mark expected switch fall-throughs drm/i915: Mark expected switch fall-throughs
Makefile: Globally enable fall-through warning
Documentation/process/deprecated.rst | 14 ++++++ Makefile | 3 ++ arch/x86/events/intel/core.c | 2 + drivers/firewire/core-device.c | 2 +- drivers/firewire/core-iso.c | 2 +- drivers/firewire/core-topology.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 - drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c | 5 +++ drivers/gpu/drm/i915/Makefile | 1 - drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 1 + drivers/mtd/nand/onenand/onenand_base.c | 1 + drivers/net/can/at91_can.c | 6 ++- drivers/net/can/peak_canfd/peak_pciefd_main.c | 2 +- drivers/net/can/spi/mcp251x.c | 3 +- drivers/net/can/usb/peak_usb/pcan_usb.c | 2 +- fs/afs/fsclient.c | 51 +++++++++++++-------- fs/afs/yfsclient.c | 54 +++++++++++++++-------- 23 files changed, 111 insertions(+), 49 deletions(-)
Hi Linus,
I've been building the kernel every time you merge new changes for -rc2 in the last couple of days, trying to catch any new warning that other people's code might have introduced. So far, it's been building cleanly with my changes on top. :)
I really hope you can merge my pull-request for -rc2.
Thank you
--
Gustavo
Quoted 93 lines · Gustavo A. R. Silva
Hi Linus,
Kees let me know about the problems you had with my previous pull-request. Apologies for the inconvenience.
Here is a new pull-request that includes a fix for those warnings you were seeing with the
dcn20_dccgdriver.Just for you to know, I'm building allmodconfig.
Please, let me know if you have any trouble and I'll address it ASAP.
Thanks!
--
GustavoThe following changes since commit
5f9e832c137075045d15cd6899ab0505cfb2ca4b:Linus 5.3-rc1 (2019-07-21 14:05:38 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.gittags/Wimplicit-fallthrough-5.3-rc2for you to fetch changes up to
a035d552a93bb9ef6048733bb9f2a0dc857ff869:
Makefile: Globally enable fall-through warning (2019-07-25 20:13:54 -0500)----------------------------------------------------------------
Wimplicit-fallthrough patches for 5.3-rc2Hi Linus,
Please, pull the following patches that mark switch cases where we are expecting to fall through. These patches are part of the ongoing efforts to enable -Wimplicit-fallthrough. Most of them have been baking in linux-next for a whole development cycle.
Also, pull the
Makefilepatch that globally enables the -Wimplicit-fallthrough option.Finally, some missing-break fixes that have been tagged for -stable:
- drm/amdkfd: Fix missing break in switch statement
- drm/amdgpu/gfx10: Fix missing break in switch statementNotice that with these changes, we completely get rid of all the fall-through warnings in the kernel.
Thanks
Signed-off-by Gustavo A. R. Silva <[email protected]>----------------------------------------------------------------
Gustavo A. R. Silva (12):
firewire: mark expected switch fall-throughs
can: mark expected switch fall-throughs
afs: yfsclient: Mark expected switch fall-throughs
afs: fsclient: Mark expected switch fall-throughs
mtd:onenand_base: Mark expected switch fall-through perf/x86/intel: Mark expected switch fall-throughs drm/amdkfd: Fix missing break in switch statement drm/amdgpu/gfx10: Fix missing break in switch statement drm/amdkfd/kfd_mqd_manager_v10: Avoid fall-through warning drm/amd/display: Mark expected switch fall-throughs drm/i915: Mark expected switch fall-throughs
Makefile: Globally enable fall-through warningDocumentation/process/deprecated.rst | 14 ++++++ Makefile | 3 ++ arch/x86/events/intel/core.c | 2 + drivers/firewire/core-device.c | 2 +- drivers/firewire/core-iso.c | 2 +- drivers/firewire/core-topology.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 - drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c | 5 +++ drivers/gpu/drm/i915/Makefile | 1 - drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 1 + drivers/mtd/nand/onenand/onenand_base.c | 1 + drivers/net/can/at91_can.c | 6 ++- drivers/net/can/peak_canfd/peak_pciefd_main.c | 2 +- drivers/net/can/spi/mcp251x.c | 3 +- drivers/net/can/usb/peak_usb/pcan_usb.c | 2 +- fs/afs/fsclient.c | 51 +++++++++++++-------- fs/afs/yfsclient.c | 54 +++++++++++++++-------- 23 files changed, 111 insertions(+), 49 deletions(-)
Quoted 3 lines · Gustavo A. R. Silva
Here is a new pull-request that includes a fix for those warnings you were seeing with the
dcn20_dccgdriver.
Ok, I have tried re-pulling and if it passes my build tests cleanly I'll push the result out.
Linus
The pull request you sent on Thu, 25 Jul 2019 21:55:21 -0500:
The pull request you sent on Thu, 25 Jul 2019 21:55:21 -0500:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.gittags/Wimplicit-fallthrough-5.3-rc2
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/88c5083442454e5e8a505b11fa16f32d2879651e
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
Quoted 4 lines · Linus Torvalds
Ok, I have tried re-pulling and if it passes my build tests cleanly I'll push the result out.
Awesome. :)
Thanks!
--
Gustavo
Quoted 8 lines · Gustavo A. R. Silva
Quoted 4 lines · Linus Torvalds
Ok, I have tried re-pulling and if it passes my build tests cleanly I'll push the result out.
Awesome. :)
BTW, now when using ccache 3.2.4 (which I admit is an old release from 2015 but included still in Ubuntu 16.04) I see a lot of fall-through warnings when building the kernel. I reported this to Gustavo before but didn't find the time to answer back to his extra questions, sorry about that.
I did investigate the issue at the time and IIRC it was because ccache strips away the comments (including the fallback comments) before feeding the source file to the compiler. Apparently newer ccache versions has a setting to avoid that but I have not tried upgrading yet. But anyone using old ccache should definitely upgrade.
Signature · 1 line
Kalle Valo
Quoted 17 lines · Kalle Valo
Quoted 8 lines · Gustavo A. R. Silva
Quoted 4 lines · Linus Torvalds
Ok, I have tried re-pulling and if it passes my build tests cleanly I'll push the result out.
Awesome. :)
BTW, now when using ccache 3.2.4 (which I admit is an old release from 2015 but included still in Ubuntu 16.04) I see a lot of fall-through warnings when building the kernel. I reported this to Gustavo before but didn't find the time to answer back to his extra questions, sorry about that.
Quoted 5 lines
I did investigate the issue at the time and IIRC it was because ccache strips away the comments (including the fallback comments) before feeding the source file to the compiler. Apparently newer ccache versions has a setting to avoid that but I have not tried upgrading yet. But anyone using old ccache should definitely upgrade.
I just installed ccache 3.4.1-1 from Ubuntu 18.04 and that seemed to fix the problem, the big number of fallthrough warnings are now gone. No extra configuration needed.
Signature · 1 line
Kalle Valo