From: kbuild test robot <lkp@intel.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Ahmet Inan <inan@distec.de>,
Martin Fuzzey <martin.fuzzey@flowbird.group>
Cc: kbuild-all@lists.01.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel@collabora.com,
Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: Re: [PATCHv2 3/5] Input: EXC3000: add EXC80H60 and EXC80H84 support
Date: Wed, 20 May 2020 07:52:03 +0800 [thread overview]
Message-ID: <202005200711.7Owi0jTC%lkp@intel.com> (raw)
In-Reply-To: <20200519182447.73405-4-sebastian.reichel@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 6716 bytes --]
Hi Sebastian,
I love your patch! Perhaps something to improve:
[auto build test WARNING on input/next]
[also build test WARNING on v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Sebastian-Reichel/EXC3000-Updates/20200520-023207
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: openrisc-randconfig-r024-20200519 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/input/touchscreen/exc3000.c:48:13: error: 'SZ_4K' undeclared here (not in a function)
48 | .max_xy = SZ_4K - 1,
| ^~~~~
drivers/input/touchscreen/exc3000.c:52:13: error: 'SZ_16K' undeclared here (not in a function)
52 | .max_xy = SZ_16K - 1,
| ^~~~~~
In file included from arch/openrisc/include/asm/bitops.h:25,
from include/linux/bitops.h:29,
from drivers/input/touchscreen/exc3000.c:10:
drivers/input/touchscreen/exc3000.c: In function 'exc3000_read_frame':
drivers/input/touchscreen/exc3000.c:99:25: warning: comparison between pointer and integer
99 | if (data->info->max_xy == SZ_16K - 1)
| ^~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> drivers/input/touchscreen/exc3000.c:99:2: note: in expansion of macro 'if'
99 | if (data->info->max_xy == SZ_16K - 1)
| ^~
drivers/input/touchscreen/exc3000.c:99:25: warning: comparison between pointer and integer
99 | if (data->info->max_xy == SZ_16K - 1)
| ^~
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> drivers/input/touchscreen/exc3000.c:99:2: note: in expansion of macro 'if'
99 | if (data->info->max_xy == SZ_16K - 1)
| ^~
drivers/input/touchscreen/exc3000.c:99:25: warning: comparison between pointer and integer
99 | if (data->info->max_xy == SZ_16K - 1)
| ^~
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) ? | ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
>> drivers/input/touchscreen/exc3000.c:99:2: note: in expansion of macro 'if'
99 | if (data->info->max_xy == SZ_16K - 1)
| ^~
vim +/if +99 drivers/input/touchscreen/exc3000.c
> 10 #include <linux/bitops.h>
11 #include <linux/device.h>
12 #include <linux/i2c.h>
13 #include <linux/input.h>
14 #include <linux/input/mt.h>
15 #include <linux/input/touchscreen.h>
16 #include <linux/interrupt.h>
17 #include <linux/module.h>
18 #include <linux/of.h>
19 #include <linux/timer.h>
20 #include <asm/unaligned.h>
21
22 #define EXC3000_NUM_SLOTS 10
23 #define EXC3000_SLOTS_PER_FRAME 5
24 #define EXC3000_LEN_FRAME 66
25 #define EXC3000_LEN_POINT 10
26
27 #define EXC3000_MT1_EVENT 0x06
28 #define EXC3000_MT2_EVENT 0x18
29
30 #define EXC3000_TIMEOUT_MS 100
31
32 static const struct i2c_device_id exc3000_id[];
33
34 struct eeti_dev_info {
35 const char *name;
36 int max_xy;
37 };
38
39 enum eeti_dev_id {
40 EETI_EXC3000,
41 EETI_EXC80H60,
42 EETI_EXC80H84,
43 };
44
45 static struct eeti_dev_info exc3000_info[] = {
46 [EETI_EXC3000] = {
47 .name = "EETI EXC3000 Touch Screen",
48 .max_xy = SZ_4K - 1,
49 },
50 [EETI_EXC80H60] = {
51 .name = "EETI EXC80H60 Touch Screen",
52 .max_xy = SZ_16K - 1,
53 },
54 [EETI_EXC80H84] = {
55 .name = "EETI EXC80H84 Touch Screen",
56 .max_xy = SZ_16K - 1,
57 },
58 };
59
60 struct exc3000_data {
61 struct i2c_client *client;
62 const struct eeti_dev_info *info;
63 struct input_dev *input;
64 struct touchscreen_properties prop;
65 struct timer_list timer;
66 u8 buf[2 * EXC3000_LEN_FRAME];
67 };
68
69 static void exc3000_report_slots(struct input_dev *input,
70 struct touchscreen_properties *prop,
71 const u8 *buf, int num)
72 {
73 for (; num--; buf += EXC3000_LEN_POINT) {
74 if (buf[0] & BIT(0)) {
75 input_mt_slot(input, buf[1]);
76 input_mt_report_slot_state(input, MT_TOOL_FINGER, true);
77 touchscreen_report_pos(input, prop,
78 get_unaligned_le16(buf + 2),
79 get_unaligned_le16(buf + 4),
80 true);
81 }
82 }
83 }
84
85 static void exc3000_timer(struct timer_list *t)
86 {
87 struct exc3000_data *data = from_timer(data, t, timer);
88
89 input_mt_sync_frame(data->input);
90 input_sync(data->input);
91 }
92
93 static int exc3000_read_frame(struct exc3000_data *data, u8 *buf)
94 {
95 struct i2c_client *client = data->client;
96 u8 expected_event = EXC3000_MT1_EVENT;
97 int ret;
98
> 99 if (data->info->max_xy == SZ_16K - 1)
100 expected_event = EXC3000_MT2_EVENT;
101
102 ret = i2c_master_send(client, "'", 2);
103 if (ret < 0)
104 return ret;
105
106 if (ret != 2)
107 return -EIO;
108
109 ret = i2c_master_recv(client, buf, EXC3000_LEN_FRAME);
110 if (ret < 0)
111 return ret;
112
113 if (ret != EXC3000_LEN_FRAME)
114 return -EIO;
115
116 if (get_unaligned_le16(buf) != EXC3000_LEN_FRAME)
117 return -EINVAL;
118
119 if (buf[2] != expected_event)
120 return -EINVAL;
121
122 return 0;
123 }
124
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30104 bytes --]
next prev parent reply other threads:[~2020-05-20 0:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 18:24 [PATCHv2 0/5] EXC3000 Updates Sebastian Reichel
2020-05-19 18:24 ` [PATCHv2 1/5] dt-bindings: touchscreen: Convert EETI EXC3000 touchscreen to json-schema Sebastian Reichel
2020-05-19 20:38 ` Enric Balletbo i Serra
2020-05-19 18:24 ` [PATCHv2 2/5] Input: EXC3000: switch to i2c's probe_new API Sebastian Reichel
2020-05-19 18:24 ` [PATCHv2 3/5] Input: EXC3000: add EXC80H60 and EXC80H84 support Sebastian Reichel
2020-05-19 23:52 ` kbuild test robot [this message]
2020-05-19 18:24 ` [PATCHv2 4/5] Input: EXC3000: Add support to query model and fw_version Sebastian Reichel
2020-05-19 21:12 ` Enric Balletbo i Serra
2020-05-19 21:31 ` Sebastian Reichel
2020-05-20 4:38 ` kbuild test robot
2020-05-19 18:24 ` [PATCHv2 5/5] Input: EXC3000: Add reset gpio support Sebastian Reichel
2020-05-19 20:57 ` Enric Balletbo i Serra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202005200711.7Owi0jTC%lkp@intel.com \
--to=lkp@intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=inan@distec.de \
--cc=kbuild-all@lists.01.org \
--cc=kernel@collabora.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.fuzzey@flowbird.group \
--cc=sebastian.reichel@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).