public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Arnd Bergmann <arnd@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Paul Elder <paul.elder@ideasonboard.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Hans de Goede <hdegoede@redhat.com>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Alain Volmat <alain.volmat@foss.st.com>,
	Mehdi Djait <mehdi.djait@bootlin.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: i2c: thp7312: select CONFIG_FW_LOADER
Date: Wed, 3 Jan 2024 23:07:34 +0200	[thread overview]
Message-ID: <20240103210734.GC17142@pendragon.ideasonboard.com> (raw)
In-Reply-To: <775efa9b-0917-4e89-abc5-470c9f4506db@infradead.org>

On Wed, Jan 03, 2024 at 12:06:33PM -0800, Randy Dunlap wrote:
> On 1/3/24 09:48, Laurent Pinchart wrote:
> > On Wed, Jan 03, 2024 at 04:58:05PM +0100, Arnd Bergmann wrote:
> >> From: Arnd Bergmann <arnd@arndb.de>
> >>
> >> The recently added driver uses the firmware loader mechanism but causes
> >> a link failure when that is in a loadable module while thp7312 itself
> >> is built-in:
> >>
> >> arm-linux-gnueabi-ld: drivers/media/i2c/thp7312.o: in function `thp7312_probe':
> >> thp7312.c:(.text+0x4164): undefined reference to `firmware_upload_register'
> >>
> >> Select the required Kconfig symbol. Note that the driver specifically
> >> needs the firmware upload interface that is controlled by CONFIG_FW_UPLOAD,
> >> but there is no link failure when that is disabled because the interfaces
> >> are stubbed out here.
> >>
> >> Fixes: 7a52ab415b43 ("media: i2c: Add driver for THine THP7312")
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > I've posted a similar fix yesterday, see
> > https://lore.kernel.org/linux-media/20240102074518.24968-1-laurent.pinchart@ideasonboard.com
> > 
> > What approach do you think is best ?
> 
> By far the dominant use of FW_LOADER is to select it instead of depend on it,
> so I prefer Arnd's patch.

The alternative could save space, but I expect that to be an uncommon
use case, as FW_LOADER will likely be selected for other reasons anyway. 

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> >> ---
> >>  drivers/media/i2c/Kconfig | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> >> index 78a87331686e..4c3435921f19 100644
> >> --- a/drivers/media/i2c/Kconfig
> >> +++ b/drivers/media/i2c/Kconfig
> >> @@ -674,6 +674,7 @@ menu "Camera ISPs"
> >>  config VIDEO_THP7312
> >>  	tristate "THine THP7312 support"
> >>  	depends on I2C
> >> +	select FW_LOADER
> >>  	select MEDIA_CONTROLLER
> >>  	select V4L2_CCI_I2C
> >>  	select V4L2_FWNODE

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2024-01-03 21:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 15:58 [PATCH] media: i2c: thp7312: select CONFIG_FW_LOADER Arnd Bergmann
2024-01-03 17:48 ` Laurent Pinchart
2024-01-03 20:06   ` Randy Dunlap
2024-01-03 21:07     ` Laurent Pinchart [this message]

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=20240103210734.GC17142@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=alain.volmat@foss.st.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mehdi.djait@bootlin.com \
    --cc=paul.elder@ideasonboard.com \
    --cc=rdunlap@infradead.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.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