Re: [PATCH 1/1] hwmon: (oxp-sensors) Add support for multiple new devices.

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

 



Hi Derek,

kernel test robot noticed the following build warnings:

[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on linus/master v6.11-rc3 next-20240815]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Derek-J-Clark/hwmon-oxp-sensors-Add-support-for-multiple-new-devices/20240815-111550
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link:    https://lore.kernel.org/r/20240815031358.21027-2-derekjohn.clark%40gmail.com
patch subject: [PATCH 1/1] hwmon: (oxp-sensors) Add support for multiple new devices.
config: i386-buildonly-randconfig-005-20240815 (https://download.01.org/0day-ci/archive/20240816/202408160329.TLNbIwRC-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/20240816/202408160329.TLNbIwRC-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/202408160329.TLNbIwRC-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/hwmon/oxp-sensors.c:497:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
     497 |                 default:
         |                 ^
   drivers/hwmon/oxp-sensors.c:497:3: note: insert 'break;' to avoid fall-through
     497 |                 default:
         |                 ^
         |                 break; 
   drivers/hwmon/oxp-sensors.c:564:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
     564 |                 default:
         |                 ^
   drivers/hwmon/oxp-sensors.c:564:3: note: insert 'break;' to avoid fall-through
     564 |                 default:
         |                 ^
         |                 break; 
   drivers/hwmon/oxp-sensors.c:616:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
     616 |                 default:
         |                 ^
   drivers/hwmon/oxp-sensors.c:616:3: note: insert 'break;' to avoid fall-through
     616 |                 default:
         |                 ^
         |                 break; 
   3 warnings generated.


vim +497 drivers/hwmon/oxp-sensors.c

   464	
   465	static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type,
   466				     u32 attr, int channel, long *val)
   467	{
   468		int ret;
   469	
   470		switch (type) {
   471		case hwmon_fan:
   472			switch (attr) {
   473			case hwmon_fan_input:
   474				switch (board) {
   475				case orange_pi_neo:
   476					return read_from_ec(ORANGEPI_SENSOR_FAN_REG, 2, val);
   477				case aok_zoe_a1:
   478				case aya_neo_2:
   479				case aya_neo_2s:
   480				case aya_neo_air:
   481				case aya_neo_air_1s:
   482				case aya_neo_air_plus_mendo:
   483				case aya_neo_air_pro:
   484				case aya_neo_flip:
   485				case aya_neo_geek:
   486				case aya_neo_geek_1s:
   487				case aya_neo_kun:
   488				case oxp_mini_amd:
   489				case oxp_mini_amd_a07:
   490				case oxp_2:
   491				case oxp_fly:
   492				case oxp_mini_amd_pro:
   493					return read_from_ec(OXP_SENSOR_FAN_REG, 2, val);
   494				default:
   495					break;
   496				}
 > 497			default:
   498				break;
   499			}
   500			break;
   501		case hwmon_pwm:
   502			switch (attr) {
   503			case hwmon_pwm_input:
   504				switch (board) {
   505				case orange_pi_neo:
   506					ret = read_from_ec(ORANGEPI_SENSOR_PWM_REG, 1, val);
   507					if (ret)
   508						return ret;
   509					/* scale from range [1-244] */
   510					*val = ((*val - 1) * 254 / 243) + 1;
   511					break;
   512				case aya_neo_2:
   513				case aya_neo_2s:
   514				case aya_neo_air:
   515				case aya_neo_air_1s:
   516				case aya_neo_air_plus_mendo:
   517				case aya_neo_air_pro:
   518				case aya_neo_flip:
   519				case aya_neo_geek:
   520				case aya_neo_geek_1s:
   521				case aya_neo_kun:
   522				case oxp_mini_amd:
   523				case oxp_mini_amd_a07:
   524					ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val);
   525					if (ret)
   526						return ret;
   527					*val = (*val * 255) / 100;
   528					break;
   529				case aok_zoe_a1:
   530				case oxp_2:
   531				case oxp_fly:
   532				case oxp_mini_amd_pro:
   533				default:
   534					ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val);
   535					if (ret)
   536						return ret;
   537					break;
   538				}
   539				return 0;
   540			case hwmon_pwm_enable:
   541				switch (board) {
   542				case orange_pi_neo:
   543					return read_from_ec(ORANGEPI_SENSOR_PWM_ENABLE_REG, 1, val);
   544				case aok_zoe_a1:
   545				case aya_neo_2:
   546				case aya_neo_2s:
   547				case aya_neo_air:
   548				case aya_neo_air_1s:
   549				case aya_neo_air_plus_mendo:
   550				case aya_neo_air_pro:
   551				case aya_neo_flip:
   552				case aya_neo_geek:
   553				case aya_neo_geek_1s:
   554				case aya_neo_kun:
   555				case oxp_mini_amd:
   556				case oxp_mini_amd_a07:
   557				case oxp_2:
   558				case oxp_fly:
   559				case oxp_mini_amd_pro:
   560					return read_from_ec(OXP_SENSOR_PWM_ENABLE_REG, 1, val);
   561				default:
   562					break;
   563				}
   564			default:
   565				break;
   566			}
   567			break;
   568		default:
   569			break;
   570		}
   571		return -EOPNOTSUPP;
   572	}
   573	

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