Re: [PATCH 4/4] checkpatch: only allow COMPILE_TEST in Kconfig dependency lines

From: Arnd Bergmann
Date: Thu Jul 04 2013 - 04:55:32 EST


On Thursday 04 July 2013, Paul Gortmaker wrote:
> The option CONFIG_COMPILE_TEST, added in commit 4bb1667255a
> ("build some drivers only when compile-testing") is meant to
> give a middle ground[1] between those who want the widest compile
> coverage possible (e.g. building sparc drivers for mips) and
> those who want dependencies to represent real world systems
> (e.g. don't allow me to see OMAP options when building x86).
>
> As such, this addition is meant to be used in dependency lines,
> properly or'd in with the real world hardware dependency. Those
> who select it, get wide compile coverage. Those who do not, get
> real world dependencies that match where the hardware is available
> and/or where the driver is useful.
>
> With that in mind, it is clear that this is _not_ to be used in
> any C code with "#ifdef CONFIG_COMPILE_TEST" etc. However there
> will (and already has been) instances of people thinking this is
> an OK practice[2]. So teach checkpatch to spot them as an error.
>
> [1] https://lkml.org/lkml/2013/3/7/456
> [2] https://lkml.org/lkml/2013/7/1/641
>
> Cc: Joe Perches <joe@xxxxxxxxxxx>
> Cc: Andy Whitcroft <apw@xxxxxxxxxxxxx>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Cc: Jiri Slaby <jslaby@xxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/