[groeck-staging:hwmon-next 63/63] drivers/hwmon/pmbus/mp9941.c:60:40: error: implicit declaration of function 'FIELD_PREP'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head:   c16fa69677811f3a33ef5d4102f106a3f8c5cbdf
commit: c16fa69677811f3a33ef5d4102f106a3f8c5cbdf [63/63] hwmon: add MP9941 driver
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240613/202406131131.1nU8FPWw-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240613/202406131131.1nU8FPWw-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/202406131131.1nU8FPWw-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/hwmon/pmbus/mp9941.c: In function 'mp9941_set_vout_format':
>> drivers/hwmon/pmbus/mp9941.c:60:40: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
      60 |         ret = (ret & ~GENMASK(7, 6)) | FIELD_PREP(GENMASK(7, 6), 3);
         |                                        ^~~~~~~~~~
   drivers/hwmon/pmbus/mp9941.c: In function 'mp9941_identify_vid_resolution':
>> drivers/hwmon/pmbus/mp9941.c:84:13: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration]
      84 |         if (FIELD_GET(GENMASK(4, 4), ret))
         |             ^~~~~~~~~
   cc1: some warnings being treated as errors


vim +/FIELD_PREP +60 drivers/hwmon/pmbus/mp9941.c

    43	
    44	static int mp9941_set_vout_format(struct i2c_client *client)
    45	{
    46		int ret;
    47	
    48		ret = i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0);
    49		if (ret < 0)
    50			return ret;
    51	
    52		ret = i2c_smbus_read_word_data(client, MFR_RESO_SET);
    53		if (ret < 0)
    54			return ret;
    55	
    56		/*
    57		 * page = 0, MFR_RESO_SET[7:6] defines the vout format
    58		 * 2'b11 set the vout format as direct
    59		 */
  > 60		ret = (ret & ~GENMASK(7, 6)) | FIELD_PREP(GENMASK(7, 6), 3);
    61	
    62		return i2c_smbus_write_word_data(client, MFR_RESO_SET, ret);
    63	}
    64	
    65	static int
    66	mp9941_identify_vid_resolution(struct i2c_client *client, struct pmbus_driver_info *info)
    67	{
    68		struct mp9941_data *data = to_mp9941_data(info);
    69		int ret;
    70	
    71		/*
    72		 * page = 2, MFR_VR_MULTI_CONFIG_R1[4:4] defines rail1 vid step value
    73		 * 1'b0 represents the vid step value is 10mV
    74		 * 1'b1 represents the vid step value is 5mV
    75		 */
    76		ret = i2c_smbus_write_byte_data(client, PMBUS_PAGE, 2);
    77		if (ret < 0)
    78			return ret;
    79	
    80		ret = i2c_smbus_read_word_data(client, MFR_VR_MULTI_CONFIG_R1);
    81		if (ret < 0)
    82			return ret;
    83	
  > 84		if (FIELD_GET(GENMASK(4, 4), ret))
    85			data->vid_resolution = 5;
    86		else
    87			data->vid_resolution = 10;
    88	
    89		return 0;
    90	}
    91	

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