[groeck-staging:hwmon-staging 104/137] drivers/hwmon/emc2103.c:380:2: warning: unannotated fall-through between switch labels

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

 



Hi Guenter,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-staging
head:   a8f382d6e448547fa649f47443668d4a5336e271
commit: bb44b8b0b1e1bae9123fef3cbcf0b4a40887e3a3 [104/137] hwmon: (emc2103) Convert to use regmap and with_info API
config: i386-buildonly-randconfig-004-20240714 (https://download.01.org/0day-ci/archive/20240714/202407140515.mXPztiXi-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240714/202407140515.mXPztiXi-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/202407140515.mXPztiXi-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/hwmon/emc2103.c:380:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
     380 |         default:
         |         ^
   drivers/hwmon/emc2103.c:380:2: note: insert 'break;' to avoid fall-through
     380 |         default:
         |         ^
         |         break; 
   drivers/hwmon/emc2103.c:188:18: warning: unused variable 'pwm_base_frequencies' [-Wunused-const-variable]
     188 | static const u16 pwm_base_frequencies[] = {26000, 19531, 4882, 2441};
         |                  ^~~~~~~~~~~~~~~~~~~~
   2 warnings generated.


vim +380 drivers/hwmon/emc2103.c

   338	
   339	static umode_t emc2103_is_visible(const void *_data, enum hwmon_sensor_types type,
   340					  u32 attr, int channel)
   341	{
   342		const struct emc2103_data *data = _data;
   343	
   344		switch (type) {
   345		case hwmon_temp:
   346			if (channel >= data->temp_count)
   347				return 0;
   348			switch (attr) {
   349			case hwmon_temp_input:
   350			case hwmon_temp_fault:
   351			case hwmon_temp_min_alarm:
   352			case hwmon_temp_max_alarm:
   353				return 0444;
   354			case hwmon_temp_min:
   355			case hwmon_temp_max:
   356				return 0644;
   357			default:
   358				break;
   359			}
   360			break;
   361		case hwmon_fan:
   362			switch (attr) {
   363			case hwmon_fan_input:
   364			case hwmon_fan_fault:
   365				return 0444;
   366			case hwmon_fan_div:
   367			case hwmon_fan_target:
   368				return 0644;
   369			default:
   370				break;
   371			}
   372			break;
   373		case hwmon_pwm:
   374			switch (attr) {
   375			case hwmon_pwm_enable:
   376				return 0644;
   377			default:
   378				break;
   379			}
 > 380		default:
   381			break;
   382		}
   383		return 0;
   384	}
   385	

-- 
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