[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201909171124.5mqUC2ud%lkp@intel.com>
Date: Tue, 17 Sep 2019 11:42:46 +0800
From: kbuild test robot <lkp@...el.com>
To: Anson Huang <Anson.Huang@....com>
Cc: kbuild-all@...org, robh+dt@...nel.org, mark.rutland@....com,
shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
festevam@...il.com, catalin.marinas@....com, will@...nel.org,
dmitry.torokhov@...il.com, aisheng.dong@....com,
ulf.hansson@...aro.org, fugang.duan@....com, peng.fan@....com,
leonard.crestez@....com, daniel.baluta@....com, olof@...om.net,
mripard@...nel.org, arnd@...db.de, jagan@...rulasolutions.com,
dinguyen@...nel.org, bjorn.andersson@...aro.org,
marcin.juszkiewicz@...aro.org, andriy.shevchenko@...ux.intel.com,
yuehaibing@...wei.com, cw00.choi@...sung.com,
enric.balletbo@...labora.com, m.felsch@...gutronix.de,
ping.bai@....com, ronald@...ovation.ch, stefan@...er.ch,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-input@...r.kernel.org,
Linux-imx@....com
Subject: Re: [PATCH V5 2/5] input: keyboard: imx_sc: Add i.MX system
controller key support
Hi Anson,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3 next-20190916]
[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/Anson-Huang/dt-bindings-fsl-scu-add-scu-key-binding/20190917-105937
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.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
GCC_VERSION=7.4.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from drivers/input/keyboard/imx_sc_key.c:6:0:
drivers/input/keyboard/imx_sc_key.c: In function 'imx_sc_check_for_events':
>> drivers/input/keyboard/imx_sc_key.c:76:60: error: 'ret' undeclared (first use in this function); did you mean 'net'?
dev_err(&input->dev, "read imx sc key failed, ret %d\n", ret);
^
include/linux/device.h:1499:32: note: in definition of macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/input/keyboard/imx_sc_key.c:76:60: note: each undeclared identifier is reported only once for each function it appears in
dev_err(&input->dev, "read imx sc key failed, ret %d\n", ret);
^
include/linux/device.h:1499:32: note: in definition of macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
vim +76 drivers/input/keyboard/imx_sc_key.c
> 6 #include <linux/device.h>
7 #include <linux/err.h>
8 #include <linux/firmware/imx/sci.h>
9 #include <linux/init.h>
10 #include <linux/input.h>
11 #include <linux/interrupt.h>
12 #include <linux/jiffies.h>
13 #include <linux/kernel.h>
14 #include <linux/module.h>
15 #include <linux/of.h>
16 #include <linux/of_address.h>
17 #include <linux/platform_device.h>
18
19 #define DEBOUNCE_TIME 30
20 #define REPEAT_INTERVAL 60
21
22 #define SC_IRQ_BUTTON 1
23 #define SC_IRQ_GROUP_WAKE 3
24 #define IMX_SC_MISC_FUNC_GET_BUTTON_STATUS 18
25
26 struct imx_key_drv_data {
27 int keycode;
28 bool keystate; /* 1: pressed, 0: release */
29 struct delayed_work check_work;
30 struct input_dev *input;
31 struct imx_sc_ipc *key_ipc_handle;
32 struct notifier_block key_notifier;
33 };
34
35 struct imx_sc_msg_key {
36 struct imx_sc_rpc_msg hdr;
37 u8 state;
38 };
39
40 static int imx_sc_key_notify(struct notifier_block *nb,
41 unsigned long event, void *group)
42 {
43 struct imx_key_drv_data *priv =
44 container_of(nb,
45 struct imx_key_drv_data,
46 key_notifier);
47
48 if ((event & SC_IRQ_BUTTON) && (*(u8 *)group == SC_IRQ_GROUP_WAKE)) {
49 schedule_delayed_work(&priv->check_work,
50 msecs_to_jiffies(DEBOUNCE_TIME));
51 pm_wakeup_event(priv->input->dev.parent, 0);
52 }
53
54 return 0;
55 }
56
57 static void imx_sc_check_for_events(struct work_struct *work)
58 {
59 struct imx_key_drv_data *priv =
60 container_of(work,
61 struct imx_key_drv_data,
62 check_work.work);
63 struct input_dev *input = priv->input;
64 struct imx_sc_msg_key msg;
65 struct imx_sc_rpc_msg *hdr = &msg.hdr;
66 bool state;
67 int error;
68
69 hdr->ver = IMX_SC_RPC_VERSION;
70 hdr->svc = IMX_SC_RPC_SVC_MISC;
71 hdr->func = IMX_SC_MISC_FUNC_GET_BUTTON_STATUS;
72 hdr->size = 1;
73
74 error = imx_scu_call_rpc(priv->key_ipc_handle, &msg, true);
75 if (error) {
> 76 dev_err(&input->dev, "read imx sc key failed, ret %d\n", ret);
77 return;
78 }
79
80 state = (bool)msg.state;
81
82 if (state ^ priv->keystate) {
83 priv->keystate = state;
84 input_event(input, EV_KEY, priv->keycode, state);
85 input_sync(input);
86 if (!priv->keystate)
87 pm_relax(priv->input->dev.parent);
88 }
89
90 if (state)
91 schedule_delayed_work(&priv->check_work,
92 msecs_to_jiffies(REPEAT_INTERVAL));
93 }
94
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (54623 bytes)
Powered by blists - more mailing lists