lkml.org 
[lkml]   [2017]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] iio: health: afe440x: Remove code in comments
Hi simran,

[auto build test ERROR on iio/togreg]
[also build test ERROR on v4.11-rc4 next-20170331]
[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/simran-singhal/iio-health-Clean-up/20170402-095718
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: x86_64-randconfig-x015-201714 (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 error/warnings (new ones prefixed by >>):

In file included from include/linux/kobject.h:21:0,
from include/linux/device.h:17,
from drivers/iio/health/afe4403.c:17:
>> drivers/iio/health/afe440x.h:96:23: error: '_name_show' undeclared here (not in a function)
static DEVICE_ATTR_RO(_name)
^
include/linux/sysfs.h:116:10: note: in definition of macro '__ATTR_RO'
.show = _name##_show, \
^~~~~
>> drivers/iio/health/afe440x.h:96:8: note: in expansion of macro 'DEVICE_ATTR_RO'
static DEVICE_ATTR_RO(_name)
^~~~~~~~~~~~~~
In file included from drivers/iio/health/afe4403.c:34:0:
>> drivers/iio/health/afe440x.h:98:1: error: expected ',' or ';' before 'struct'
struct afe440x_attr {
^~~~~~
>> drivers/iio/health/afe4403.c:110:2: error: implicit declaration of function 'AFE440X_INTENSITY_CHAN' [-Werror=implicit-function-declaration]
AFE440X_INTENSITY_CHAN(LED2, 0),
^~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/health/afe4403.c:110:2: error: initializer element is not constant
drivers/iio/health/afe4403.c:110:2: note: (near initialization for 'afe4403_channels[0].type')
drivers/iio/health/afe4403.c:111:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(ALED2, 0),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4403.c:111:2: note: (near initialization for 'afe4403_channels[0].channel')
drivers/iio/health/afe4403.c:112:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(LED1, 0),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4403.c:112:2: note: (near initialization for 'afe4403_channels[0].channel2')
drivers/iio/health/afe4403.c:113:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(ALED1, 0),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4403.c:113:2: note: (near initialization for 'afe4403_channels[0].address')
drivers/iio/health/afe4403.c:114:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(LED2_ALED2, 0),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4403.c:114:2: note: (near initialization for 'afe4403_channels[0].scan_index')
drivers/iio/health/afe4403.c:115:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(LED1_ALED1, 0),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4403.c:115:2: note: (near initialization for 'afe4403_channels[0].scan_type.sign')
>> drivers/iio/health/afe4403.c:117:2: error: implicit declaration of function 'AFE440X_CURRENT_CHAN' [-Werror=implicit-function-declaration]
AFE440X_CURRENT_CHAN(LED2),
^~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4403.c:117:2: error: initializer element is not constant
drivers/iio/health/afe4403.c:117:2: note: (near initialization for 'afe4403_channels[0].scan_type.realbits')
drivers/iio/health/afe4403.c:118:2: error: initializer element is not constant
AFE440X_CURRENT_CHAN(LED1),
^~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4403.c:118:2: note: (near initialization for 'afe4403_channels[0].scan_type.storagebits')
>> drivers/iio/health/afe4403.c:125:1: warning: data definition has no type or storage class
AFE440X_TABLE_ATTR(in_intensity_resistance_available, afe4403_res_table);
^~~~~~~~~~~~~~~~~~
>> drivers/iio/health/afe4403.c:125:1: error: type defaults to 'int' in declaration of 'AFE440X_TABLE_ATTR' [-Werror=implicit-int]
>> drivers/iio/health/afe4403.c:125:1: warning: parameter names (without types) in function declaration
drivers/iio/health/afe4403.c:137:1: warning: data definition has no type or storage class
AFE440X_TABLE_ATTR(in_intensity_capacitance_available, afe4403_cap_table);
^~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4403.c:137:1: error: type defaults to 'int' in declaration of 'AFE440X_TABLE_ATTR' [-Werror=implicit-int]
drivers/iio/health/afe4403.c:137:1: warning: parameter names (without types) in function declaration
drivers/iio/health/afe4403.c: In function 'afe440x_show_register':
>> drivers/iio/health/afe4403.c:145:38: error: implicit declaration of function 'to_afe440x_attr' [-Werror=implicit-function-declaration]
struct afe440x_attr *afe440x_attr = to_afe440x_attr(attr);
^~~~~~~~~~~~~~~
>> drivers/iio/health/afe4403.c:145:38: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
>> drivers/iio/health/afe4403.c:150:50: error: dereferencing pointer to incomplete type 'struct afe440x_attr'
ret = regmap_field_read(afe->fields[afe440x_attr->field], &reg_val);
^~
>> drivers/iio/health/afe4403.c:150:50: error: request for member 'field' in something not a structure or union
>> drivers/iio/health/afe4403.c:150:37: error: array subscript is not an integer
ret = regmap_field_read(afe->fields[afe440x_attr->field], &reg_val);
^
>> drivers/iio/health/afe4403.c:150:26: error: passing argument 1 of 'regmap_field_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = regmap_field_read(afe->fields[afe440x_attr->field], &reg_val);
^~~
In file included from drivers/iio/health/afe4403.c:22:0:
include/linux/regmap.h:850:5: note: expected 'struct regmap_field *' but argument is of type 'const struct iio_chan_spec *'
int regmap_field_read(struct regmap_field *field, unsigned int *val);
^~~~~~~~~~~~~~~~~
>> drivers/iio/health/afe4403.c:154:29: error: request for member 'table_size' in something not a structure or union
if (reg_val >= afe440x_attr->table_size)
^~
>> drivers/iio/health/afe4403.c:154:14: warning: comparison between pointer and integer
if (reg_val >= afe440x_attr->table_size)
^~
>> drivers/iio/health/afe4403.c:157:24: error: request for member 'val_table' in something not a structure or union
vals[0] = afe440x_attr->val_table[reg_val].integer;
^~
>> drivers/iio/health/afe4403.c:157:44: error: 'const struct iio_chan_spec' has no member named 'integer'; did you mean 'indexed'?
vals[0] = afe440x_attr->val_table[reg_val].integer;
^
>> drivers/iio/health/afe4403.c:157:10: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
vals[0] = afe440x_attr->val_table[reg_val].integer;
^
drivers/iio/health/afe4403.c:158:24: error: request for member 'val_table' in something not a structure or union
vals[1] = afe440x_attr->val_table[reg_val].fract;
^~
--
In file included from include/linux/kobject.h:21:0,
from include/linux/device.h:17,
from drivers/iio/health/afe4404.c:17:
>> drivers/iio/health/afe440x.h:96:23: error: '_name_show' undeclared here (not in a function)
static DEVICE_ATTR_RO(_name)
^
include/linux/sysfs.h:116:10: note: in definition of macro '__ATTR_RO'
.show = _name##_show, \
^~~~~
>> drivers/iio/health/afe440x.h:96:8: note: in expansion of macro 'DEVICE_ATTR_RO'
static DEVICE_ATTR_RO(_name)
^~~~~~~~~~~~~~
In file included from drivers/iio/health/afe4404.c:34:0:
>> drivers/iio/health/afe440x.h:98:1: error: expected ',' or ';' before 'struct'
struct afe440x_attr {
^~~~~~
>> drivers/iio/health/afe4404.c:137:2: error: implicit declaration of function 'AFE440X_INTENSITY_CHAN' [-Werror=implicit-function-declaration]
AFE440X_INTENSITY_CHAN(LED2, BIT(IIO_CHAN_INFO_OFFSET)),
^~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/health/afe4404.c:137:2: error: initializer element is not constant
drivers/iio/health/afe4404.c:137:2: note: (near initialization for 'afe4404_channels[0].type')
drivers/iio/health/afe4404.c:138:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(ALED2, BIT(IIO_CHAN_INFO_OFFSET)),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4404.c:138:2: note: (near initialization for 'afe4404_channels[0].channel')
drivers/iio/health/afe4404.c:139:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(LED1, BIT(IIO_CHAN_INFO_OFFSET)),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4404.c:139:2: note: (near initialization for 'afe4404_channels[0].channel2')
drivers/iio/health/afe4404.c:140:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(ALED1, BIT(IIO_CHAN_INFO_OFFSET)),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4404.c:140:2: note: (near initialization for 'afe4404_channels[0].address')
drivers/iio/health/afe4404.c:141:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(LED2_ALED2, 0),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4404.c:141:2: note: (near initialization for 'afe4404_channels[0].scan_index')
drivers/iio/health/afe4404.c:142:2: error: initializer element is not constant
AFE440X_INTENSITY_CHAN(LED1_ALED1, 0),
^~~~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4404.c:142:2: note: (near initialization for 'afe4404_channels[0].scan_type.sign')
>> drivers/iio/health/afe4404.c:144:2: error: implicit declaration of function 'AFE440X_CURRENT_CHAN' [-Werror=implicit-function-declaration]
AFE440X_CURRENT_CHAN(LED2),
^~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4404.c:144:2: error: initializer element is not constant
drivers/iio/health/afe4404.c:144:2: note: (near initialization for 'afe4404_channels[0].scan_type.realbits')
drivers/iio/health/afe4404.c:145:2: error: initializer element is not constant
AFE440X_CURRENT_CHAN(ALED2),
^~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4404.c:145:2: note: (near initialization for 'afe4404_channels[0].scan_type.storagebits')
drivers/iio/health/afe4404.c:146:2: error: initializer element is not constant
AFE440X_CURRENT_CHAN(LED1),
^~~~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4404.c:146:2: note: (near initialization for 'afe4404_channels[0].scan_type.shift')
>> drivers/iio/health/afe4404.c:159:1: warning: data definition has no type or storage class
AFE440X_TABLE_ATTR(in_intensity_resistance_available, afe4404_res_table);
^~~~~~~~~~~~~~~~~~
>> drivers/iio/health/afe4404.c:159:1: error: type defaults to 'int' in declaration of 'AFE440X_TABLE_ATTR' [-Werror=implicit-int]
>> drivers/iio/health/afe4404.c:159:1: warning: parameter names (without types) in function declaration
drivers/iio/health/afe4404.c:171:1: warning: data definition has no type or storage class
AFE440X_TABLE_ATTR(in_intensity_capacitance_available, afe4404_cap_table);
^~~~~~~~~~~~~~~~~~
drivers/iio/health/afe4404.c:171:1: error: type defaults to 'int' in declaration of 'AFE440X_TABLE_ATTR' [-Werror=implicit-int]
drivers/iio/health/afe4404.c:171:1: warning: parameter names (without types) in function declaration
drivers/iio/health/afe4404.c: In function 'afe440x_show_register':
>> drivers/iio/health/afe4404.c:179:38: error: implicit declaration of function 'to_afe440x_attr' [-Werror=implicit-function-declaration]
struct afe440x_attr *afe440x_attr = to_afe440x_attr(attr);
^~~~~~~~~~~~~~~
>> drivers/iio/health/afe4404.c:179:38: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
>> drivers/iio/health/afe4404.c:184:50: error: dereferencing pointer to incomplete type 'struct afe440x_attr'
ret = regmap_field_read(afe->fields[afe440x_attr->field], &reg_val);
^~
>> drivers/iio/health/afe4404.c:184:50: error: request for member 'field' in something not a structure or union
>> drivers/iio/health/afe4404.c:184:37: error: array subscript is not an integer
ret = regmap_field_read(afe->fields[afe440x_attr->field], &reg_val);
^
>> drivers/iio/health/afe4404.c:184:26: error: passing argument 1 of 'regmap_field_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = regmap_field_read(afe->fields[afe440x_attr->field], &reg_val);
^~~
In file included from drivers/iio/health/afe4404.c:23:0:
include/linux/regmap.h:850:5: note: expected 'struct regmap_field *' but argument is of type 'const struct iio_chan_spec *'
int regmap_field_read(struct regmap_field *field, unsigned int *val);
^~~~~~~~~~~~~~~~~
>> drivers/iio/health/afe4404.c:188:29: error: request for member 'table_size' in something not a structure or union
if (reg_val >= afe440x_attr->table_size)
^~
>> drivers/iio/health/afe4404.c:188:14: warning: comparison between pointer and integer
if (reg_val >= afe440x_attr->table_size)
^~
>> drivers/iio/health/afe4404.c:191:24: error: request for member 'val_table' in something not a structure or union
vals[0] = afe440x_attr->val_table[reg_val].integer;
^~
>> drivers/iio/health/afe4404.c:191:44: error: 'const struct iio_chan_spec' has no member named 'integer'; did you mean 'indexed'?
vals[0] = afe440x_attr->val_table[reg_val].integer;
^
>> drivers/iio/health/afe4404.c:191:10: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
vals[0] = afe440x_attr->val_table[reg_val].integer;
^
drivers/iio/health/afe4404.c:192:24: error: request for member 'val_table' in something not a structure or union
vals[1] = afe440x_attr->val_table[reg_val].fract;
^~

vim +/_name_show +96 drivers/iio/health/afe440x.h

87aec56e2 Andrew F. Davis 2016-02-02 90
87aec56e2 Andrew F. Davis 2016-02-02 91 struct afe440x_val_table {
87aec56e2 Andrew F. Davis 2016-02-02 92 int integer;
87aec56e2 Andrew F. Davis 2016-02-02 93 int fract;
87aec56e2 Andrew F. Davis 2016-02-02 94 };
87aec56e2 Andrew F. Davis 2016-02-02 95
87aec56e2 Andrew F. Davis 2016-02-02 @96 static DEVICE_ATTR_RO(_name)
87aec56e2 Andrew F. Davis 2016-02-02 97
87aec56e2 Andrew F. Davis 2016-02-02 @98 struct afe440x_attr {
87aec56e2 Andrew F. Davis 2016-02-02 99 struct device_attribute dev_attr;
b36e82576 Andrew F. Davis 2016-05-01 100 unsigned int field;
87aec56e2 Andrew F. Davis 2016-02-02 101 const struct afe440x_val_table *val_table;

:::::: The code at line 96 was first introduced by commit
:::::: 87aec56e27efac98b7a0abe93258687716bf0b1e iio: health: Add driver for the TI AFE4404 heart monitor

:::::: TO: Andrew F. Davis <afd@ti.com>
:::::: CC: Jonathan Cameron <jic23@kernel.org>

---
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-04-02 04:40    [W:0.076 / U:1.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site