* [groeck-staging:hwmon-next 63/63] drivers/hwmon/pmbus/mp9941.c:60:40: error: implicit declaration of function 'FIELD_PREP'
@ 2024-06-13 3:48 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-06-13 3:48 UTC (permalink / raw)
To: Noah Wang; +Cc: oe-kbuild-all, linux-hwmon, Guenter Roeck
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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406131131.1nU8FPWw-lkp@intel.com/
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-13 3:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 3:48 [groeck-staging:hwmon-next 63/63] drivers/hwmon/pmbus/mp9941.c:60:40: error: implicit declaration of function 'FIELD_PREP' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox