All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <m.chehab@samsung.com>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Antti Palosaari <crope@iki.fi>, linux-media@vger.kernel.org
Subject: Re: [linuxtv-media:master 483/499] m88ds3103.c:undefined reference to `i2c_del_mux_adapter'
Date: Sat, 21 Dec 2013 08:50:48 -0200	[thread overview]
Message-ID: <20131221085048.40a00d81@samsung.com> (raw)
In-Reply-To: <52b4fca0.ygAJPoOJD83r3RML%fengguang.wu@intel.com>

Em Sat, 21 Dec 2013 10:27:44 +0800
kbuild test robot <fengguang.wu@intel.com> escreveu:

> tree:   git://linuxtv.org/media_tree.git master
> head:   c57f87e62368c33ebda11a4993380c8e5a19a5c5
> commit: 44b9055b4b058d7b02bf0380158627f9be79b9e5 [483/499] [media] m88ds3103: use I2C mux for tuner I2C adapter
> config: i386-randconfig-x0-12210941 (attached as .config)
> 
> All error/warnings:
> 
> warning: (VIDEO_EM28XX_DVB) selects DVB_M88DS3103 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CORE && I2C && I2C_MUX)
>    drivers/built-in.o: In function `m88ds3103_release':
> >> m88ds3103.c:(.text+0x1ab1af): undefined reference to `i2c_del_mux_adapter'
>    drivers/built-in.o: In function `m88ds3103_attach':
> >> (.text+0x1ab342): undefined reference to `i2c_add_mux_adapter'
> 
> ---
> 0-DAY kernel build testing backend              Open Source Technology Center
> http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation

Not sure what's the best fix for this. I can see 3 alternatives:

1) make em28xx dependent on I2C_MUX.

That sounds wrong, as the em28xx bridge doesn't have i2c muxes on it,
and just one frontend has.

Well, we may eventually convert all i2c gate stuff into i2c mux support,
with makes sense, but it takes time and lots of effort.

2) we may make MEDIA_SUBDRV_AUTOSELECT dependent of I2C and I2C_MUX.

That means that users will need to manually enable I2C_MUX on some
distributions. Not sure about others, but, on Fedora, this option is
disabled.

So, we'll end by receiving a number of complains from users, until all
distros that ship media start adding I2C_MUX.

3) if MEDIA_SUBDRV_AUTOSELECT is selected, it will select I2C and I2C_MUX.

Of course, MEDIA_SUBDRV_AUTOSELECT will need to inherit all dependencies
that I2C and I2C_MUX have (only HAS_IOMEM).

The disadvantage is that, if new dependencies are added on I2C, they'll
also need to be added here.

As the hole idea of autoselect is to let the user not bother about whatever
frontend/tuner is used by a driver, IMHO, (3) is the better solution.

Patch for (3) is enclosed.

-- 

Cheers,
Mauro

From: Mauro Carvalho Chehab <m.chehab@samsung.com>
Date: Sat, 21 Dec 2013 05:42:11 -0200
Subject: [PATCH] [media] subdev autoselect only works if I2C and I2C_MUX is selected

As reported by the kbuild test robot <fengguang.wu@intel.com>:

> warning: (VIDEO_EM28XX_DVB) selects DVB_M88DS3103 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CORE && I2C && I2C_MUX)
>    drivers/built-in.o: In function `m88ds3103_release':
> >> m88ds3103.c:(.text+0x1ab1af): undefined reference to `i2c_del_mux_adapter'
>    drivers/built-in.o: In function `m88ds3103_attach':
> >> (.text+0x1ab342): undefined reference to `i2c_add_mux_adapter'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 8270388e2a0d..1d0758aeb8e4 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -172,6 +172,9 @@ comment "Media ancillary drivers (tuners, sensors, i2c, frontends)"
 config MEDIA_SUBDRV_AUTOSELECT
 	bool "Autoselect ancillary drivers (tuners, sensors, i2c, frontends)"
 	depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_CAMERA_SUPPORT
+	depends on HAS_IOMEM
+	select I2C
+	select I2C_MUX
 	default y
 	help
 	  By default, a media driver auto-selects all possible ancillary

  reply	other threads:[~2013-12-21 10:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-21  2:27 [linuxtv-media:master 483/499] m88ds3103.c:undefined reference to `i2c_del_mux_adapter' kbuild test robot
2013-12-21 10:50 ` Mauro Carvalho Chehab [this message]
2013-12-21 11:04   ` Mauro Carvalho Chehab

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=20131221085048.40a00d81@samsung.com \
    --to=m.chehab@samsung.com \
    --cc=crope@iki.fi \
    --cc=fengguang.wu@intel.com \
    --cc=linux-media@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.