From: Arnd Bergmann <arnd@arndb.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
devicetree-discuss@lists.ozlabs.org,
Greg Kroah-Hartman <gregkh@suse.de>,
kernel@pengutronix.de, linux-serial@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Kconfig option for compile time build coverage (Was: Re: [PATCH] serial/efm32: add new driver)
Date: Wed, 25 Jan 2012 16:16:26 +0000 [thread overview]
Message-ID: <201201251616.27019.arnd@arndb.de> (raw)
In-Reply-To: <20120109095903.GC14252@pengutronix.de>
On Monday 09 January 2012, Uwe Kleine-König wrote:
> On Fri, Dec 23, 2011 at 09:44:28PM +0100, Uwe Kleine-König wrote:
> > On Fri, Dec 23, 2011 at 10:35:22AM +0000, Arnd Bergmann wrote:
> > > On Thursday 22 December 2011, Uwe Kleine-König wrote:
> > > > [...]
> > > > +config SERIAL_EFM32_USART
> > > > + bool "EFM32 USART port."
> > > > + depends on ARCH_EFM32
> > > > + select SERIAL_CORE
> > [...]
> > > I would generally prefer not to make the driver depend on the
> > > platform, so we can get better compile time coverage. I think a better
> > > set of dependencies would be
> > >
> > > depends on HAVE_CLK
> > > depends on OF
> > > default ARCH_EFM32
> > I'd prefer something like:
> >
> > depends on HAVE_CLK
> > depends on ARCH_EFM32 || I_DO_BUILD_COVERAGE_TESTING
> >
> > This would make it easier for Joe User to pick the right options for his
> > kernel (assuming he found out to better keep I_DO_BUILD_COVERAGE_TESTING
> > disabled). [...]
>
> What do you think about this I_DO_BUILD_COVERAGE_TESTING option? It
> would allow testers to get all possible options enabled (though there
> will never be an EFM32 USART port on a non-EFM32 machine I guess) and
> still users and distribution packagers would easily keep the option off
> even without cluttering .config and {menu,n,x,whatever}config.
Sorry for the late reply. The same topic has been discussed a lot of
times. We have different ways to handle this in the kernel, but the
way most common way is to use defconfig to decide which drivers to
use on a given machine but give the user the freedom to both enable
and disable any driver whereever possible, even if that would be
a silly thing to do. What we do require normally is that anything
that can be enabled is also able to be built without errors. A lot
of drivers have dependencies on platform specific header files
or other interfaces, so they require that platform to be enabled.
For all others I would not make such a restriction and I would always
recommend to be specific in the dependencies, e.g depending on HAVE_CLK
when you use the clock interfaces, instead of depending on other options
that implicitly enable HAVE_CLK.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
devicetree-discuss@lists.ozlabs.org,
"Greg Kroah-Hartman" <gregkh@suse.de>,
kernel@pengutronix.de, linux-serial@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Kconfig option for compile time build coverage (Was: Re: [PATCH] serial/efm32: add new driver)
Date: Wed, 25 Jan 2012 16:16:26 +0000 [thread overview]
Message-ID: <201201251616.27019.arnd@arndb.de> (raw)
In-Reply-To: <20120109095903.GC14252@pengutronix.de>
On Monday 09 January 2012, Uwe Kleine-König wrote:
> On Fri, Dec 23, 2011 at 09:44:28PM +0100, Uwe Kleine-König wrote:
> > On Fri, Dec 23, 2011 at 10:35:22AM +0000, Arnd Bergmann wrote:
> > > On Thursday 22 December 2011, Uwe Kleine-König wrote:
> > > > [...]
> > > > +config SERIAL_EFM32_USART
> > > > + bool "EFM32 USART port."
> > > > + depends on ARCH_EFM32
> > > > + select SERIAL_CORE
> > [...]
> > > I would generally prefer not to make the driver depend on the
> > > platform, so we can get better compile time coverage. I think a better
> > > set of dependencies would be
> > >
> > > depends on HAVE_CLK
> > > depends on OF
> > > default ARCH_EFM32
> > I'd prefer something like:
> >
> > depends on HAVE_CLK
> > depends on ARCH_EFM32 || I_DO_BUILD_COVERAGE_TESTING
> >
> > This would make it easier for Joe User to pick the right options for his
> > kernel (assuming he found out to better keep I_DO_BUILD_COVERAGE_TESTING
> > disabled). [...]
>
> What do you think about this I_DO_BUILD_COVERAGE_TESTING option? It
> would allow testers to get all possible options enabled (though there
> will never be an EFM32 USART port on a non-EFM32 machine I guess) and
> still users and distribution packagers would easily keep the option off
> even without cluttering .config and {menu,n,x,whatever}config.
Sorry for the late reply. The same topic has been discussed a lot of
times. We have different ways to handle this in the kernel, but the
way most common way is to use defconfig to decide which drivers to
use on a given machine but give the user the freedom to both enable
and disable any driver whereever possible, even if that would be
a silly thing to do. What we do require normally is that anything
that can be enabled is also able to be built without errors. A lot
of drivers have dependencies on platform specific header files
or other interfaces, so they require that platform to be enabled.
For all others I would not make such a restriction and I would always
recommend to be specific in the dependencies, e.g depending on HAVE_CLK
when you use the clock interfaces, instead of depending on other options
that implicitly enable HAVE_CLK.
Arnd
next prev parent reply other threads:[~2012-01-25 16:16 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 15:05 [PATCH] serial/efm32: add new driver Uwe Kleine-König
2011-12-21 15:05 ` Uwe Kleine-König
2011-12-21 20:28 ` Alan Cox
2011-12-21 20:28 ` Alan Cox
2011-12-22 8:57 ` Uwe Kleine-König
[not found] ` <20111221202847.4ffeba10-Z/y2cZnRghHXmaaqVzeoHQ@public.gmane.org>
2011-12-22 13:38 ` Uwe Kleine-König
2011-12-22 13:38 ` Uwe Kleine-König
2011-12-23 10:35 ` Arnd Bergmann
2011-12-23 10:35 ` Arnd Bergmann
2011-12-23 20:44 ` Uwe Kleine-König
[not found] ` <20111223204428.GI24496-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-01-09 9:59 ` Kconfig option for compile time build coverage (Was: Re: [PATCH] serial/efm32: add new driver) Uwe Kleine-König
2012-01-09 9:59 ` Uwe Kleine-König
2012-01-25 16:16 ` Arnd Bergmann [this message]
2012-01-25 16:16 ` Arnd Bergmann
2012-01-09 10:34 ` [PATCH] serial/efm32: add new driver Uwe Kleine-König
2012-01-25 16:56 ` Arnd Bergmann
2012-01-25 16:56 ` Arnd Bergmann
[not found] ` <1324561092-1945-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-01-09 16:44 ` [PATCH v3] " Uwe Kleine-König
2012-01-09 16:44 ` Uwe Kleine-König
2012-01-24 22:05 ` Greg KH
2012-01-24 22:05 ` Greg KH
2012-01-25 8:05 ` [PATCH v4] " Uwe Kleine-König
2012-01-25 8:05 ` Uwe Kleine-König
2012-01-25 8:25 ` Joe Perches
2012-01-25 8:25 ` Joe Perches
2012-01-25 8:41 ` Uwe Kleine-König
2012-01-25 15:52 ` Greg KH
2012-01-25 18:36 ` Uwe Kleine-König
2012-01-25 18:36 ` Uwe Kleine-König
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=201201251616.27019.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=alan@linux.intel.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=gregkh@suse.de \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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.