LinuxTV Patchwork [linux-next:master,1790/12310] drivers/media/platform/seco-cec/seco-cec.c:355: undefined reference to `devm_rc_allocate_device'

login
register
mail settings
Submitter Sean Young
Date March 5, 2019, 3:24 p.m.
Message ID <20190305152407.xxhjg27nvpfrxppv@gofer.mess.org>
Download mbox | patch
Permalink /patch/54851/
State Superseded
Delegated to: Sean Young
Headers show

Comments

Sean Young - March 5, 2019, 3:24 p.m.
On Tue, Mar 05, 2019 at 10:53:40PM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   baf5a9d1f9b95eb97e9eb54932e20dbbf814771c
> commit: f27dd0ad68850fdb806536a733a32d8f74810f1e [1790/12310] media: seco-cec: fix RC_CORE dependency
> config: x86_64-randconfig-s5-03051951 (attached as .config)
> compiler: gcc-8 (Debian 8.3.0-2) 8.3.0
> reproduce:
>         git checkout f27dd0ad68850fdb806536a733a32d8f74810f1e
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    ld: drivers/media/platform/seco-cec/seco-cec.o: in function `secocec_ir_probe':
> >> drivers/media/platform/seco-cec/seco-cec.c:355: undefined reference to `devm_rc_allocate_device'
> >> ld: drivers/media/platform/seco-cec/seco-cec.c:395: undefined reference to `devm_rc_register_device'
>    ld: drivers/media/platform/seco-cec/seco-cec.o: in function `secocec_ir_rx':
> >> drivers/media/platform/seco-cec/seco-cec.c:432: undefined reference to `rc_keydown'
> 
> vim +355 drivers/media/platform/seco-cec/seco-cec.c
> 
> b03c2fb9 Ettore Chimenti 2018-10-21  345  
> daef9576 Ettore Chimenti 2018-10-21  346  #ifdef CONFIG_VIDEO_SECO_RC
> daef9576 Ettore Chimenti 2018-10-21  347  static int secocec_ir_probe(void *priv)
> daef9576 Ettore Chimenti 2018-10-21  348  {
> daef9576 Ettore Chimenti 2018-10-21  349  	struct secocec_data *cec = priv;
> daef9576 Ettore Chimenti 2018-10-21  350  	struct device *dev = cec->dev;
> daef9576 Ettore Chimenti 2018-10-21  351  	int status;
> daef9576 Ettore Chimenti 2018-10-21  352  	u16 val;
> daef9576 Ettore Chimenti 2018-10-21  353  
> daef9576 Ettore Chimenti 2018-10-21  354  	/* Prepare the RC input device */
> daef9576 Ettore Chimenti 2018-10-21 @355  	cec->ir = devm_rc_allocate_device(dev, RC_DRIVER_SCANCODE);

So the config has:

CONFIG_CEC_CORE=y
CONFIG_RC_CORE=m
CONFIG_VIDEO_SECO_CEC=y
CONFIG_VIDEO_SECO_RC=y

So devm_rc_allocate_device() is in a module, while seco-cec is not.
CONFIG_VIDEO_SECO_RC itself is a boolean and depends on CONFIG_RC_CORE.


Sean

From f0f5df60c88075162483965014f9319d19f121d2 Mon Sep 17 00:00:00 2001
From: Sean Young <sean@mess.org>
Date: Tue, 5 Mar 2019 15:14:40 +0000
Subject: [PATCH] media: seco-cec: depend on CONFIG_RC_CORE=y when not a module

Ensure that if seco-cec is not compiled as a module, then neither
should rc-core. Found by 0-day.

Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/platform/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index 4acbed189644..02756c018c0f 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -649,7 +649,7 @@  config VIDEO_SECO_CEC
 config VIDEO_SECO_RC
 	bool "SECO Boards IR RC5 support"
 	depends on VIDEO_SECO_CEC
-	depends on RC_CORE
+	depends on RC_CORE=y || (RC_CORE=m && VIDEO_SECO_CEC=m)
 	help
 	  If you say yes here you will get support for the
 	  SECO Boards Consumer-IR in seco-cec driver.

Privacy Policy