Re: [PATCH v2] hwmon: (aquacomputer_d5next) Add support for Aquacomputer Octo

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

 



Hi Aleksa,

I love your patch! Perhaps something to improve:

[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on next-20220325]
[cannot apply to v5.17]
[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/Aleksa-Savic/hwmon-aquacomputer_d5next-Add-support-for-Aquacomputer-Octo/20220326-181328
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20220326/202203262032.UaIhk6RY-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
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/ffb6d76f23a93a5875a427d03dc6a67538277e19
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Aleksa-Savic/hwmon-aquacomputer_d5next-Add-support-for-Aquacomputer-Octo/20220326-181328
        git checkout ffb6d76f23a93a5875a427d03dc6a67538277e19
        # 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=i386 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/aquacomputer_d5next.c:420:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                   default:
                   ^
   drivers/hwmon/aquacomputer_d5next.c:420:3: note: insert 'break;' to avoid fall-through
                   default:
                   ^
                   break; 
   drivers/hwmon/aquacomputer_d5next.c:489:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                   default:
                   ^
   drivers/hwmon/aquacomputer_d5next.c:489:3: note: insert 'break;' to avoid fall-through
                   default:
                   ^
                   break; 
   drivers/hwmon/aquacomputer_d5next.c:698:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
           default:
           ^
   drivers/hwmon/aquacomputer_d5next.c:698:2: note: insert 'break;' to avoid fall-through
           default:
           ^
           break; 
   3 warnings generated.


vim +420 drivers/hwmon/aquacomputer_d5next.c

   389	
   390	static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
   391			    int channel, long *val)
   392	{
   393		int ret;
   394		struct aqc_data *priv = dev_get_drvdata(dev);
   395	
   396		if (time_after(jiffies, priv->updated + STATUS_UPDATE_INTERVAL))
   397			return -ENODATA;
   398	
   399		switch (type) {
   400		case hwmon_temp:
   401			if (priv->temp_input[channel] == -ENODATA)
   402				return -ENODATA;
   403	
   404			*val = priv->temp_input[channel];
   405			break;
   406		case hwmon_fan:
   407			*val = priv->speed_input[channel];
   408			break;
   409		case hwmon_power:
   410			*val = priv->power_input[channel];
   411			break;
   412		case hwmon_pwm:
   413			switch (priv->kind) {
   414			case octo:
   415				ret = aqc_get_ctrl_val(priv, octo_ctrl_fan_offsets[channel]);
   416				if (ret < 0)
   417					return ret;
   418	
   419				*val = aqc_percent_to_pwm(ret);
 > 420			default:
   421				break;
   422			}
   423			break;
   424		case hwmon_in:
   425			*val = priv->voltage_input[channel];
   426			break;
   427		case hwmon_curr:
   428			*val = priv->current_input[channel];
   429			break;
   430		default:
   431			return -EOPNOTSUPP;
   432		}
   433	
   434		return 0;
   435	}
   436	

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



[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