[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202311170235.HaVJnmWa-lkp@intel.com>
Date: Fri, 17 Nov 2023 02:23:16 +0800
From: kernel test robot <lkp@...el.com>
To: Hiten Chauhan <hiten.chauhan@...iconsignals.io>,
jmaneyrol@...ensense.com, jic23@...nel.org, lars@...afoo.de,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev,
Hiten Chauhan <hiten.chauhan@...iconsignals.io>
Subject: Re: [PATCH v2 1/1] Added tilt interrupt support in inv_icm42600
Hi Hiten,
kernel test robot noticed the following build errors:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linus/master v6.7-rc1 next-20231116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Hiten-Chauhan/Added-tilt-interrupt-support-in-inv_icm42600/20231116-214808
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20231116134528.21467-1-hiten.chauhan%40siliconsignals.io
patch subject: [PATCH v2 1/1] Added tilt interrupt support in inv_icm42600
config: arm-randconfig-001-20231117 (https://download.01.org/0day-ci/archive/20231117/202311170235.HaVJnmWa-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231117/202311170235.HaVJnmWa-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311170235.HaVJnmWa-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c:117:61: error: macro "DEVICE_ATTR_RW" passed 4 arguments, but takes just 1
117 | tilt_interrupt_show, tilt_interrupt_store);
| ^
In file included from drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c:7:
include/linux/device.h:179: note: macro "DEVICE_ATTR_RW" defined here
179 | #define DEVICE_ATTR_RW(_name) \
|
>> drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c:116:8: error: type defaults to 'int' in declaration of 'DEVICE_ATTR_RW' [-Werror=implicit-int]
116 | static DEVICE_ATTR_RW(tilt_interrupt, 0644,
| ^~~~~~~~~~~~~~
>> drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c:120:10: error: 'dev_attr_tilt_interrupt' undeclared here (not in a function)
120 | &dev_attr_tilt_interrupt.attr,
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c:116:8: warning: 'DEVICE_ATTR_RW' defined but not used [-Wunused-variable]
116 | static DEVICE_ATTR_RW(tilt_interrupt, 0644,
| ^~~~~~~~~~~~~~
>> drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c:82:16: warning: 'tilt_interrupt_store' defined but not used [-Wunused-function]
82 | static ssize_t tilt_interrupt_store(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c:65:16: warning: 'tilt_interrupt_show' defined but not used [-Wunused-function]
65 | static ssize_t tilt_interrupt_show(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/DEVICE_ATTR_RW +117 drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
> 7 #include <linux/device.h>
8 #include <linux/mutex.h>
9 #include <linux/pm_runtime.h>
10 #include <linux/regmap.h>
11 #include <linux/delay.h>
12 #include <linux/math64.h>
13
14 #include <linux/iio/buffer.h>
15 #include <linux/iio/common/inv_sensors_timestamp.h>
16 #include <linux/iio/iio.h>
17 #include <linux/iio/kfifo_buf.h>
18
19 #include "inv_icm42600.h"
20 #include "inv_icm42600_temp.h"
21 #include "inv_icm42600_buffer.h"
22
23 #define INV_ICM42600_ACCEL_CHAN(_modifier, _index, _ext_info) \
24 { \
25 .type = IIO_ACCEL, \
26 .modified = 1, \
27 .channel2 = _modifier, \
28 .info_mask_separate = \
29 BIT(IIO_CHAN_INFO_RAW) | \
30 BIT(IIO_CHAN_INFO_CALIBBIAS), \
31 .info_mask_shared_by_type = \
32 BIT(IIO_CHAN_INFO_SCALE), \
33 .info_mask_shared_by_type_available = \
34 BIT(IIO_CHAN_INFO_SCALE) | \
35 BIT(IIO_CHAN_INFO_CALIBBIAS), \
36 .info_mask_shared_by_all = \
37 BIT(IIO_CHAN_INFO_SAMP_FREQ), \
38 .info_mask_shared_by_all_available = \
39 BIT(IIO_CHAN_INFO_SAMP_FREQ), \
40 .scan_index = _index, \
41 .scan_type = { \
42 .sign = 's', \
43 .realbits = 16, \
44 .storagebits = 16, \
45 .endianness = IIO_BE, \
46 }, \
47 .ext_info = _ext_info, \
48 }
49
50 uint8_t inv_icm42605_int_reg;
51
52 enum inv_icm42600_accel_scan {
53 INV_ICM42600_ACCEL_SCAN_X,
54 INV_ICM42600_ACCEL_SCAN_Y,
55 INV_ICM42600_ACCEL_SCAN_Z,
56 INV_ICM42600_ACCEL_SCAN_TEMP,
57 INV_ICM42600_ACCEL_SCAN_TIMESTAMP,
58 };
59
60 static const struct iio_chan_spec_ext_info inv_icm42600_accel_ext_infos[] = {
61 IIO_MOUNT_MATRIX(IIO_SHARED_BY_ALL, inv_icm42600_get_mount_matrix),
62 {},
63 };
64
> 65 static ssize_t tilt_interrupt_show(struct device *dev,
66 struct device_attribute *attr, char *buf)
67 {
68 struct inv_icm42600_state *st = dev_get_drvdata(dev);
69 unsigned int val;
70 int ret;
71
72 ret = regmap_read(st->map, inv_icm42605_int_reg, &val);
73
74 if (ret != 0)
75 return ret;
76
77 snprintf(buf, PAGE_SIZE, "Read reg %x value %x\n", inv_icm42605_int_reg, val);
78
79 return strlen(buf);
80 }
81
> 82 static ssize_t tilt_interrupt_store(struct device *dev,
83 struct device_attribute *attr, const char *buf,
84 size_t count)
85 {
86 struct inv_icm42600_state *st = dev_get_drvdata(dev);
87 int ret;
88 int value;
89
90 if (!st)
91 return -EINVAL;
92
93 if (kstrtoint(buf, 10, &value))
94 return -EINVAL;
95
96 inv_icm42605_int_reg = INV_ICM42605_REG_INT_STATUS3;
97
98 switch (value) {
99 case 1:
100 ret = inv_icm42605_generate_tilt_interrupt(st);
101 if (ret != 0)
102 return -EIO;
103 break;
104 case 0:
105 ret = inv_icm42605_disable_tilt_interrupt(st);
106 if (ret != 0)
107 return -EIO;
108 break;
109 default:
110 return -EINVAL;
111 }
112
113 return count;
114 }
115
> 116 static DEVICE_ATTR_RW(tilt_interrupt, 0644,
> 117 tilt_interrupt_show, tilt_interrupt_store);
118
119 static struct attribute *icm42605_attrs[] = {
> 120 &dev_attr_tilt_interrupt.attr,
121 NULL,
122 };
123
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists