lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 5 Oct 2021 13:25:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Kees Cook <keescook@...omium.org>
Subject: [gustavoars:for-next/clang-fallthrough 4/4]
 drivers/bus/ti-sysc.c:2957:3: warning: unannotated fall-through between
 switch labels

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/clang-fallthrough
head:   236378bb6ca791cbde68eacedd7688084d06177e
commit: 236378bb6ca791cbde68eacedd7688084d06177e [4/4] Makefile: Enable -Wimplicit-fallthrough for Clang
config: arm-randconfig-r012-20211004 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c0039de2953d15815448b4b3c3bafb45607781e0)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=236378bb6ca791cbde68eacedd7688084d06177e
        git remote add gustavoars https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
        git fetch --no-tags gustavoars for-next/clang-fallthrough
        git checkout 236378bb6ca791cbde68eacedd7688084d06177e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm 

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

All warnings (new ones prefixed by >>):

>> drivers/bus/ti-sysc.c:2957:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                   default:
                   ^
   drivers/bus/ti-sysc.c:2957:3: note: insert 'break;' to avoid fall-through
                   default:
                   ^
                   break; 
   1 warning generated.


vim +2957 drivers/bus/ti-sysc.c

feaa8baee82aba Tony Lindgren 2020-02-24  2898  
feaa8baee82aba Tony Lindgren 2020-02-24  2899  /*
feaa8baee82aba Tony Lindgren 2020-02-24  2900   * One time init to detect the booted SoC and disable unavailable features.
feaa8baee82aba Tony Lindgren 2020-02-24  2901   * Note that we initialize static data shared across all ti-sysc instances
feaa8baee82aba Tony Lindgren 2020-02-24  2902   * so ddata is only used for SoC type. This can be called from module_init
feaa8baee82aba Tony Lindgren 2020-02-24  2903   * once we no longer need to rely on platform data.
feaa8baee82aba Tony Lindgren 2020-02-24  2904   */
feaa8baee82aba Tony Lindgren 2020-02-24  2905  static int sysc_init_soc(struct sysc *ddata)
feaa8baee82aba Tony Lindgren 2020-02-24  2906  {
feaa8baee82aba Tony Lindgren 2020-02-24  2907  	const struct soc_device_attribute *match;
feaa8baee82aba Tony Lindgren 2020-02-24  2908  	struct ti_sysc_platform_data *pdata;
feaa8baee82aba Tony Lindgren 2020-02-24  2909  	unsigned long features = 0;
5f7259a578e9c6 Tony Lindgren 2021-03-08  2910  	struct device_node *np;
feaa8baee82aba Tony Lindgren 2020-02-24  2911  
feaa8baee82aba Tony Lindgren 2020-02-24  2912  	if (sysc_soc)
feaa8baee82aba Tony Lindgren 2020-02-24  2913  		return 0;
feaa8baee82aba Tony Lindgren 2020-02-24  2914  
feaa8baee82aba Tony Lindgren 2020-02-24  2915  	sysc_soc = kzalloc(sizeof(*sysc_soc), GFP_KERNEL);
feaa8baee82aba Tony Lindgren 2020-02-24  2916  	if (!sysc_soc)
feaa8baee82aba Tony Lindgren 2020-02-24  2917  		return -ENOMEM;
feaa8baee82aba Tony Lindgren 2020-02-24  2918  
feaa8baee82aba Tony Lindgren 2020-02-24  2919  	mutex_init(&sysc_soc->list_lock);
feaa8baee82aba Tony Lindgren 2020-02-24  2920  	INIT_LIST_HEAD(&sysc_soc->disabled_modules);
feaa8baee82aba Tony Lindgren 2020-02-24  2921  	sysc_soc->general_purpose = true;
feaa8baee82aba Tony Lindgren 2020-02-24  2922  
feaa8baee82aba Tony Lindgren 2020-02-24  2923  	pdata = dev_get_platdata(ddata->dev);
feaa8baee82aba Tony Lindgren 2020-02-24  2924  	if (pdata && pdata->soc_type_gp)
feaa8baee82aba Tony Lindgren 2020-02-24  2925  		sysc_soc->general_purpose = pdata->soc_type_gp();
feaa8baee82aba Tony Lindgren 2020-02-24  2926  
feaa8baee82aba Tony Lindgren 2020-02-24  2927  	match = soc_device_match(sysc_soc_match);
feaa8baee82aba Tony Lindgren 2020-02-24  2928  	if (match && match->data)
feaa8baee82aba Tony Lindgren 2020-02-24  2929  		sysc_soc->soc = (int)match->data;
feaa8baee82aba Tony Lindgren 2020-02-24  2930  
5f7259a578e9c6 Tony Lindgren 2021-03-08  2931  	/*
5f7259a578e9c6 Tony Lindgren 2021-03-08  2932  	 * Check and warn about possible old incomplete dtb. We now want to see
5f7259a578e9c6 Tony Lindgren 2021-03-08  2933  	 * simple-pm-bus instead of simple-bus in the dtb for genpd using SoCs.
5f7259a578e9c6 Tony Lindgren 2021-03-08  2934  	 */
5f7259a578e9c6 Tony Lindgren 2021-03-08  2935  	switch (sysc_soc->soc) {
5f7259a578e9c6 Tony Lindgren 2021-03-08  2936  	case SOC_AM3:
5f7259a578e9c6 Tony Lindgren 2021-03-08  2937  	case SOC_AM4:
4adcf4c28f6dc1 Tony Lindgren 2021-03-12  2938  	case SOC_4430 ... SOC_4470:
4adcf4c28f6dc1 Tony Lindgren 2021-03-12  2939  	case SOC_5430:
4adcf4c28f6dc1 Tony Lindgren 2021-03-12  2940  	case SOC_DRA7:
5f7259a578e9c6 Tony Lindgren 2021-03-08  2941  		np = of_find_node_by_path("/ocp");
5f7259a578e9c6 Tony Lindgren 2021-03-08  2942  		WARN_ONCE(np && of_device_is_compatible(np, "simple-bus"),
5f7259a578e9c6 Tony Lindgren 2021-03-08  2943  			  "ti-sysc: Incomplete old dtb, please update\n");
5f7259a578e9c6 Tony Lindgren 2021-03-08  2944  		break;
5f7259a578e9c6 Tony Lindgren 2021-03-08  2945  	default:
5f7259a578e9c6 Tony Lindgren 2021-03-08  2946  		break;
5f7259a578e9c6 Tony Lindgren 2021-03-08  2947  	}
5f7259a578e9c6 Tony Lindgren 2021-03-08  2948  
4bba9bf08ff41d Tony Lindgren 2020-05-07  2949  	/* Ignore devices that are not available on HS and EMU SoCs */
4bba9bf08ff41d Tony Lindgren 2020-05-07  2950  	if (!sysc_soc->general_purpose) {
4bba9bf08ff41d Tony Lindgren 2020-05-07  2951  		switch (sysc_soc->soc) {
4bba9bf08ff41d Tony Lindgren 2020-05-07  2952  		case SOC_3430 ... SOC_3630:
4bba9bf08ff41d Tony Lindgren 2020-05-07  2953  			sysc_add_disabled(0x48304000);	/* timer12 */
4bba9bf08ff41d Tony Lindgren 2020-05-07  2954  			break;
a6d90e9f22328f Kevin Hilman  2021-07-20  2955  		case SOC_AM3:
a6d90e9f22328f Kevin Hilman  2021-07-20  2956  			sysc_add_disabled(0x48310000);  /* rng */
4bba9bf08ff41d Tony Lindgren 2020-05-07 @2957  		default:
4bba9bf08ff41d Tony Lindgren 2020-05-07  2958  			break;
52fbb5aabb5cf6 Yang Li       2021-02-02  2959  		}
4bba9bf08ff41d Tony Lindgren 2020-05-07  2960  	}
4bba9bf08ff41d Tony Lindgren 2020-05-07  2961  
feaa8baee82aba Tony Lindgren 2020-02-24  2962  	match = soc_device_match(sysc_soc_feat_match);
feaa8baee82aba Tony Lindgren 2020-02-24  2963  	if (!match)
feaa8baee82aba Tony Lindgren 2020-02-24  2964  		return 0;
feaa8baee82aba Tony Lindgren 2020-02-24  2965  
feaa8baee82aba Tony Lindgren 2020-02-24  2966  	if (match->data)
feaa8baee82aba Tony Lindgren 2020-02-24  2967  		features = (unsigned long)match->data;
feaa8baee82aba Tony Lindgren 2020-02-24  2968  
feaa8baee82aba Tony Lindgren 2020-02-24  2969  	/*
feaa8baee82aba Tony Lindgren 2020-02-24  2970  	 * Add disabled devices to the list based on the module base.
feaa8baee82aba Tony Lindgren 2020-02-24  2971  	 * Note that this must be done before we attempt to access the
feaa8baee82aba Tony Lindgren 2020-02-24  2972  	 * device and have module revision checks working.
feaa8baee82aba Tony Lindgren 2020-02-24  2973  	 */
feaa8baee82aba Tony Lindgren 2020-02-24  2974  	if (features & DIS_ISP)
feaa8baee82aba Tony Lindgren 2020-02-24  2975  		sysc_add_disabled(0x480bd400);
feaa8baee82aba Tony Lindgren 2020-02-24  2976  	if (features & DIS_IVA)
feaa8baee82aba Tony Lindgren 2020-02-24  2977  		sysc_add_disabled(0x5d000000);
feaa8baee82aba Tony Lindgren 2020-02-24  2978  	if (features & DIS_SGX)
feaa8baee82aba Tony Lindgren 2020-02-24  2979  		sysc_add_disabled(0x50000000);
feaa8baee82aba Tony Lindgren 2020-02-24  2980  
feaa8baee82aba Tony Lindgren 2020-02-24  2981  	return 0;
feaa8baee82aba Tony Lindgren 2020-02-24  2982  }
feaa8baee82aba Tony Lindgren 2020-02-24  2983  

:::::: The code at line 2957 was first introduced by commit
:::::: 4bba9bf08ff41d78b91581937d97664638bd6bb8 bus: ti-sysc: Ignore timer12 on secure omap3

:::::: TO: Tony Lindgren <tony@...mide.com>
:::::: CC: Tony Lindgren <tony@...mide.com>

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

Download attachment ".config.gz" of type "application/gzip" (33666 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ