CC:
kbuil...@lists.01.org
CC:
linux...@vger.kernel.org
TO: Guenter Roeck <
li...@roeck-us.net>
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-playground
head: 4e5fc259a7d202d7e13818052a6cdaff0f602b35
commit: 4e87220ea3c48bcb3aeadc4000acf9bcc7aa7522 [3/12] hwmon: (pmbus) Implement multi-phase support
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (git://gitmirror/llvm_project ba8110161dfb096bbc63039afd87ff6417328f91)
reproduce:
git checkout 4e87220ea3c48bcb3aeadc4000acf9bcc7aa7522
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <
l...@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/hwmon/pmbus/pmbus_core.c:174:18: warning: address of array 'data->info->phases' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (data->info->phases && data->currphase != phase &&
~~~~~~~~~~~~^~~~~~ ~~
1 warning generated.
vim +174 drivers/hwmon/pmbus/pmbus_core.c
150
151 int pmbus_set_page(struct i2c_client *client, int page, int phase)
152 {
153 struct pmbus_data *data = i2c_get_clientdata(client);
154 int rv;
155
156 if (page < 0)
157 return 0;
158
159 if (!(data->info->func[page] & PMBUS_PAGE_VIRTUAL) &&
160 data->info->pages > 1 && page != data->currpage) {
161 rv = i2c_smbus_write_byte_data(client, PMBUS_PAGE, page);
162 if (rv < 0)
163 return rv;
164
165 rv = i2c_smbus_read_byte_data(client, PMBUS_PAGE);
166 if (rv < 0)
167 return rv;
168
169 if (rv != page)
170 return -EIO;
171 }
172 data->currpage = page;
173
> 174 if (data->info->phases && data->currphase != phase &&
175 !(data->info->pfunc[phase] & PMBUS_PHASE_VIRTUAL)) {
176 rv = i2c_smbus_write_byte_data(client, PMBUS_PHASE,
177 phase);
178 if (rv)
179 return rv;
180 }
181 data->currphase = phase;
182
183 return 0;
184 }
185 EXPORT_SYMBOL_GPL(pmbus_set_page);
186
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuil...@lists.01.org Intel Corporation