Re: [PATCH v7 8/9] mfd: smpro-mfd: Adds Ampere's Altra SMpro MFD driver

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

 



Hi Quan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on groeck-staging/hwmon-next lee-mfd/for-mfd-next v5.17 next-20220321]
[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/Quan-Nguyen/Add-Ampere-s-Altra-SMPro-MFD-and-its-child-drivers/20220321-161811
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 37fd83916da2e4cae03d350015c82a67b1b334c4
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20220322/202203220139.67ewF74A-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 85e9b2687a13d1908aa86d1b89c5ce398a06cd39)
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
        # https://github.com/0day-ci/linux/commit/20d62dfe69d4a3a0cb64bf97df0062d050d6a4d4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Quan-Nguyen/Add-Ampere-s-Altra-SMPro-MFD-and-its-child-drivers/20220321-161811
        git checkout 20d62dfe69d4a3a0cb64bf97df0062d050d6a4d4
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/hwmon/

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

All warnings (new ones prefixed by >>):

>> drivers/hwmon/smpro-hwmon.c:378:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   drivers/hwmon/smpro-hwmon.c:378:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   1 warning generated.


vim +378 drivers/hwmon/smpro-hwmon.c

91d3fe230bebb1c Quan Nguyen 2022-03-21  359  
91d3fe230bebb1c Quan Nguyen 2022-03-21  360  static umode_t smpro_is_visible(const void *data, enum hwmon_sensor_types type,
91d3fe230bebb1c Quan Nguyen 2022-03-21  361  				u32 attr, int channel)
91d3fe230bebb1c Quan Nguyen 2022-03-21  362  {
91d3fe230bebb1c Quan Nguyen 2022-03-21  363  	const struct smpro_hwmon *hwmon = data;
91d3fe230bebb1c Quan Nguyen 2022-03-21  364  	unsigned int value;
91d3fe230bebb1c Quan Nguyen 2022-03-21  365  	int ret;
91d3fe230bebb1c Quan Nguyen 2022-03-21  366  
91d3fe230bebb1c Quan Nguyen 2022-03-21  367  	switch (type) {
91d3fe230bebb1c Quan Nguyen 2022-03-21  368  	case hwmon_temp:
91d3fe230bebb1c Quan Nguyen 2022-03-21  369  		switch (attr) {
91d3fe230bebb1c Quan Nguyen 2022-03-21  370  		case hwmon_temp_input:
91d3fe230bebb1c Quan Nguyen 2022-03-21  371  		case hwmon_temp_label:
91d3fe230bebb1c Quan Nguyen 2022-03-21  372  		case hwmon_temp_crit:
91d3fe230bebb1c Quan Nguyen 2022-03-21  373  			ret = regmap_read(hwmon->regmap, temperature[channel].reg, &value);
91d3fe230bebb1c Quan Nguyen 2022-03-21  374  			if (ret || value == 0xFFFF)
91d3fe230bebb1c Quan Nguyen 2022-03-21  375  				return 0;
91d3fe230bebb1c Quan Nguyen 2022-03-21  376  		break;
91d3fe230bebb1c Quan Nguyen 2022-03-21  377  		}
91d3fe230bebb1c Quan Nguyen 2022-03-21 @378  	default:
91d3fe230bebb1c Quan Nguyen 2022-03-21  379  		break;
91d3fe230bebb1c Quan Nguyen 2022-03-21  380  	}
91d3fe230bebb1c Quan Nguyen 2022-03-21  381  
91d3fe230bebb1c Quan Nguyen 2022-03-21  382  	return 0444;
91d3fe230bebb1c Quan Nguyen 2022-03-21  383  }
91d3fe230bebb1c Quan Nguyen 2022-03-21  384  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux