linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Anson Huang <Anson.Huang@nxp.com>
Cc: mark.rutland@arm.com, ulf.hansson@linaro.org, ping.bai@nxp.com,
	catalin.marinas@arm.com, peng.fan@nxp.com, stefan@agner.ch,
	bjorn.andersson@linaro.org, leonard.crestez@nxp.com,
	will@kernel.org, festevam@gmail.com, yuehaibing@huawei.com,
	marcin.juszkiewicz@linaro.org, cw00.choi@samsung.com,
	jagan@amarulasolutions.com, linux-input@vger.kernel.org,
	ronald@innovation.ch, Linux-imx@nxp.com,
	devicetree@vger.kernel.org, arnd@arndb.de,
	s.hauer@pengutronix.de, mripard@kernel.org,
	m.felsch@pengutronix.de, enric.balletbo@collabora.com,
	robh+dt@kernel.org, andriy.shevchenko@linux.intel.com,
	daniel.baluta@nxp.com, linux-arm-kernel@lists.infradead.org,
	aisheng.dong@nxp.com, fugang.duan@nxp.com,
	dmitry.torokhov@gmail.com, linux-kernel@vger.kernel.org,
	dinguyen@kernel.org, kbuild-all@01.org, kernel@pengutronix.de,
	olof@lixom.net, shawnguo@kernel.org
Subject: Re: [PATCH V5 2/5] input: keyboard: imx_sc: Add i.MX system controller key support
Date: Tue, 17 Sep 2019 11:42:46 +0800	[thread overview]
Message-ID: <201909171124.5mqUC2ud%lkp@intel.com> (raw)
In-Reply-To: <1568688939-13649-2-git-send-email-Anson.Huang@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 4810 bytes --]

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@intel.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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 54623 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-17  3:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17  2:55 [PATCH V5 1/5] dt-bindings: fsl: scu: add scu key binding Anson Huang
2019-09-17  2:55 ` [PATCH V5 2/5] input: keyboard: imx_sc: Add i.MX system controller key support Anson Huang
2019-09-17  3:42   ` kbuild test robot [this message]
2019-09-17  2:55 ` [PATCH V5 3/5] arm64: dts: imx8qxp: Add scu key node Anson Huang
2019-09-17  2:55 ` [PATCH V5 4/5] arm64: dts: imx8qxp-mek: Enable scu key Anson Huang
2019-09-17  2:55 ` [PATCH V5 5/5] arm64: defconfig: Enable CONFIG_KEYBOARD_IMX_SC_KEY as module Anson Huang
2019-09-17  3:14 ` [PATCH V5 1/5] dt-bindings: fsl: scu: add scu key binding Anson Huang

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=201909171124.5mqUC2ud%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Anson.Huang@nxp.com \
    --cc=Linux-imx@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=cw00.choi@samsung.com \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=enric.balletbo@collabora.com \
    --cc=festevam@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=jagan@amarulasolutions.com \
    --cc=kbuild-all@01.org \
    --cc=kernel@pengutronix.de \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=mark.rutland@arm.com \
    --cc=mripard@kernel.org \
    --cc=olof@lixom.net \
    --cc=peng.fan@nxp.com \
    --cc=ping.bai@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=ronald@innovation.ch \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    --cc=ulf.hansson@linaro.org \
    --cc=will@kernel.org \
    --cc=yuehaibing@huawei.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).