Re: [PATCH v2] regulator (max5970): Add hwmon support

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

 



Hi Naresh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 35d0d2350d774fecf596cfb2fb050559fe5e1850]

url:    https://github.com/intel-lab-lkp/linux/commits/Naresh-Solanki/regulator-max5970-Add-hwmon-support/20230901-173611
base:   35d0d2350d774fecf596cfb2fb050559fe5e1850
patch link:    https://lore.kernel.org/r/20230901093449.838414-1-Naresh.Solanki%409elements.com
patch subject: [PATCH v2] regulator (max5970): Add hwmon support
config: x86_64-randconfig-004-20230902 (https://download.01.org/0day-ci/archive/20230902/202309020434.x0wzOQpo-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230902/202309020434.x0wzOQpo-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309020434.x0wzOQpo-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

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


vim +124 drivers/regulator/max5970-regulator.c

    99	
   100	static umode_t max5970_is_visible(const void *data,
   101					  enum hwmon_sensor_types type,
   102					  u32 attr, int channel)
   103	{
   104		struct max5970_data *ddata = (struct max5970_data *)data;
   105	
   106		if (channel >= ddata->num_switches)
   107			return 0;
   108	
   109		switch (type) {
   110		case hwmon_in:
   111			switch (attr) {
   112			case hwmon_in_input:
   113				return 0444;
   114			default:
   115				break;
   116			}
   117			break;
   118		case hwmon_curr:
   119			switch (attr) {
   120			case hwmon_curr_input:
   121				/* Current measurement requires knowledge of the shunt resistor value. */
   122				if (ddata->shunt_micro_ohms[channel])
   123					return 0444;
 > 124			default:
   125				break;
   126			}
   127			break;
   128		default:
   129			break;
   130		}
   131		return 0;
   132	}
   133	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux