lkml.org 
[lkml]   [2017]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/3] hwmon: ltc2990: support all measurement modes
Hi Tom,

[auto build test WARNING on hwmon/hwmon-next]
[also build test WARNING on v4.12 next-20170704]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Tom-Levens/hwmon-ltc2990-refactor-value-conversion/20170705-050920
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: x86_64-randconfig-x010-201727 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

drivers/hwmon/ltc2990.c: In function 'ltc2990_attrs_visible':
>> drivers/hwmon/ltc2990.c:164:40: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
ltc2990_attrs_ena_0[data->mode[0]] &
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
ltc2990_attrs_ena_1[data->mode[1]];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +164 drivers/hwmon/ltc2990.c

148 if (unlikely(ret < 0))
149 return ret;
150
151 return snprintf(buf, PAGE_SIZE, "%d\n", value);
152 }
153
154 static umode_t ltc2990_attrs_visible(struct kobject *kobj,
155 struct attribute *a, int n)
156 {
157 struct device *dev = container_of(kobj, struct device, kobj);
158 struct ltc2990_data *data = dev_get_drvdata(dev);
159 struct device_attribute *da =
160 container_of(a, struct device_attribute, attr);
161 struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
162
163 int attrs_mask = LTC2990_IN0 | LTC2990_TEMP1 |
> 164 ltc2990_attrs_ena_0[data->mode[0]] &
165 ltc2990_attrs_ena_1[data->mode[1]];
166
167 if (attr->index & attrs_mask)
168 return a->mode;
169
170 return 0;
171 }
172

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-07-05 00:47    [W:0.146 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site