Re: [PATCH v2] Revert "kbuild: Do not enable -Wimplicit-fallthrough for clang for now"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nick,

I love your patch! Perhaps something to improve:

[auto build test WARNING on kbuild/for-next]
[also build test WARNING on v5.10-rc3 next-20201109]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Nick-Desaulniers/Revert-kbuild-Do-not-enable-Wimplicit-fallthrough-for-clang-for-now/20201109-093904
base:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next
config: powerpc64-randconfig-r014-20201109 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 09ec07827b1128504457a93dee80b2ceee1af600)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://github.com/0day-ci/linux/commit/8b3537ff657d0124d47fbe215decbba65c4551ff
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nick-Desaulniers/Revert-kbuild-Do-not-enable-Wimplicit-fallthrough-for-clang-for-now/20201109-093904
        git checkout 8b3537ff657d0124d47fbe215decbba65c4551ff
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/vi.c:24:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:29:
   In file included from include/linux/mm.h:687:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:241:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:241:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:241:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
   include/linux/signal.h:253:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:253:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:253:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
>> drivers/gpu/drm/amd/amdgpu/vi.c:1648:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   drivers/gpu/drm/amd/amdgpu/vi.c:1648:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   3 warnings generated.
--
   In file included from drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:25:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:29:
   In file included from include/linux/mm.h:687:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:241:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:241:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:241:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
   include/linux/signal.h:253:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:253:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:253:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
>> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:505:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:505:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:382:23: warning: unused variable 'ecc_umc_mcumc_status_addrs' [-Wunused-const-variable]
   static const uint32_t ecc_umc_mcumc_status_addrs[] = {
                         ^
   4 warnings generated.
--
   In file included from drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:28:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:29:
   In file included from include/linux/mm.h:687:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:241:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:241:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:241:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
   include/linux/signal.h:253:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:253:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:253:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:2985:6: warning: no previous prototype for function 'gfx_v9_0_rlc_stop' [-Wmissing-prototypes]
   void gfx_v9_0_rlc_stop(struct amdgpu_device *adev)
        ^
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:2985:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void gfx_v9_0_rlc_stop(struct amdgpu_device *adev)
   ^
   static 
>> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:5676:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:5676:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   4 warnings generated.
--
   In file included from drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:28:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:29:
   In file included from include/linux/mm.h:687:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:241:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:241:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:241:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
   include/linux/signal.h:253:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:253:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:253:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
   drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:4863:6: warning: no previous prototype for function 'gfx_v10_0_rlc_stop' [-Wmissing-prototypes]
   void gfx_v10_0_rlc_stop(struct amdgpu_device *adev)
        ^
   drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:4863:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void gfx_v10_0_rlc_stop(struct amdgpu_device *adev)
   ^
   static 
>> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:8397:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:8397:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   4 warnings generated.
--
   In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:24:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:29:
   In file included from include/linux/mm.h:687:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:241:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:241:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:241:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
   include/linux/signal.h:253:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:253:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:253:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:2045:5: warning: no previous prototype for function 'polaris10_thermal_avfs_enable' [-Wmissing-prototypes]
   int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
       ^
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:2045:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
   ^
   static 
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:2275:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:2275:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   4 warnings generated.
--
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:28:
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:37:
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29:
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:30:
   In file included from include/linux/kgdb.h:19:
   In file included from include/linux/kprobes.h:29:
   In file included from include/linux/ftrace.h:11:
   In file included from include/linux/kallsyms.h:12:
   In file included from include/linux/mm.h:687:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:241:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:241:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:241:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
   include/linux/signal.h:253:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           case 1: ;
           ^
   include/linux/signal.h:253:2: note: insert '__attribute__((fallthrough));' to silence this warning
           case 1: ;
           ^
           __attribute__((fallthrough)); 
   include/linux/signal.h:253:2: note: insert 'break;' to avoid fall-through
           case 1: ;
           ^
           break; 
>> drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1201:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1201:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2587:16: warning: no previous prototype for function 'update_slot_layout_info' [-Wmissing-prototypes]
   enum bp_result update_slot_layout_info(
                  ^
   drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2587:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   enum bp_result update_slot_layout_info(
   ^
   static 
   drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2691:16: warning: no previous prototype for function 'get_bracket_layout_record' [-Wmissing-prototypes]
   enum bp_result get_bracket_layout_record(
                  ^
   drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:2691:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   enum bp_result get_bracket_layout_record(
   ^
   static 
   5 warnings generated.
..

vim +1648 drivers/gpu/drm/amd/amdgpu/vi.c

1bb08f91b0f6b2d Rex Zhu         2016-09-18  1611  
5fc3aeeb9e553a2 yanyang1        2015-05-22  1612  static int vi_common_set_clockgating_state(void *handle,
5fc3aeeb9e553a2 yanyang1        2015-05-22  1613  					   enum amd_clockgating_state state)
aaa36a976bbb9b0 Alex Deucher    2015-04-20  1614  {
6cec2655fa988b4 Eric Huang      2015-11-12  1615  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
6cec2655fa988b4 Eric Huang      2015-11-12  1616  
ce137c04ff4bb78 Monk Liu        2017-01-23  1617  	if (amdgpu_sriov_vf(adev))
ce137c04ff4bb78 Monk Liu        2017-01-23  1618  		return 0;
ce137c04ff4bb78 Monk Liu        2017-01-23  1619  
6cec2655fa988b4 Eric Huang      2015-11-12  1620  	switch (adev->asic_type) {
6cec2655fa988b4 Eric Huang      2015-11-12  1621  	case CHIP_FIJI:
76f10b9adae111d Alex Deucher    2016-04-08  1622  		vi_update_bif_medium_grain_light_sleep(adev,
7e91366420554e7 Andrew F. Davis 2017-03-15  1623  				state == AMD_CG_STATE_GATE);
76f10b9adae111d Alex Deucher    2016-04-08  1624  		vi_update_hdp_medium_grain_clock_gating(adev,
7e91366420554e7 Andrew F. Davis 2017-03-15  1625  				state == AMD_CG_STATE_GATE);
76f10b9adae111d Alex Deucher    2016-04-08  1626  		vi_update_hdp_light_sleep(adev,
7e91366420554e7 Andrew F. Davis 2017-03-15  1627  				state == AMD_CG_STATE_GATE);
76f10b9adae111d Alex Deucher    2016-04-08  1628  		vi_update_rom_medium_grain_clock_gating(adev,
7e91366420554e7 Andrew F. Davis 2017-03-15  1629  				state == AMD_CG_STATE_GATE);
76f10b9adae111d Alex Deucher    2016-04-08  1630  		break;
76f10b9adae111d Alex Deucher    2016-04-08  1631  	case CHIP_CARRIZO:
76f10b9adae111d Alex Deucher    2016-04-08  1632  	case CHIP_STONEY:
76f10b9adae111d Alex Deucher    2016-04-08  1633  		vi_update_bif_medium_grain_light_sleep(adev,
7e91366420554e7 Andrew F. Davis 2017-03-15  1634  				state == AMD_CG_STATE_GATE);
76f10b9adae111d Alex Deucher    2016-04-08  1635  		vi_update_hdp_medium_grain_clock_gating(adev,
7e91366420554e7 Andrew F. Davis 2017-03-15  1636  				state == AMD_CG_STATE_GATE);
76f10b9adae111d Alex Deucher    2016-04-08  1637  		vi_update_hdp_light_sleep(adev,
7e91366420554e7 Andrew F. Davis 2017-03-15  1638  				state == AMD_CG_STATE_GATE);
f6f534e2af5b518 Rex Zhu         2016-12-08  1639  		vi_update_drm_light_sleep(adev,
7e91366420554e7 Andrew F. Davis 2017-03-15  1640  				state == AMD_CG_STATE_GATE);
6cec2655fa988b4 Eric Huang      2015-11-12  1641  		break;
1bb08f91b0f6b2d Rex Zhu         2016-09-18  1642  	case CHIP_TONGA:
1bb08f91b0f6b2d Rex Zhu         2016-09-18  1643  	case CHIP_POLARIS10:
1bb08f91b0f6b2d Rex Zhu         2016-09-18  1644  	case CHIP_POLARIS11:
c4642a479fac9f5 Junwei Zhang    2016-12-14  1645  	case CHIP_POLARIS12:
b51c5194a5b8d78 Leo Liu         2018-04-11  1646  	case CHIP_VEGAM:
1bb08f91b0f6b2d Rex Zhu         2016-09-18  1647  		vi_common_set_clockgating_state_by_smu(adev, state);
6cec2655fa988b4 Eric Huang      2015-11-12 @1648  	default:
6cec2655fa988b4 Eric Huang      2015-11-12  1649  		break;
6cec2655fa988b4 Eric Huang      2015-11-12  1650  	}
aaa36a976bbb9b0 Alex Deucher    2015-04-20  1651  	return 0;
aaa36a976bbb9b0 Alex Deucher    2015-04-20  1652  }
aaa36a976bbb9b0 Alex Deucher    2015-04-20  1653  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux