On Sat, May 24, 2008 at 11:06:21AM +0100, Jeremy Fitzhardinge wrote:A quite common pattern in the kernel is: #if defined(CONFIG_FOO) || (defined(CONFIG_FOO_MODULE) && defined(MODULE)) Your suggestion would require them to be changed to: #if (defined(CONFIG_FOO) && !defined(CONFIG_FOO_MODULE)) || (defined(CONFIG_FOO_MODULE) && defined(MODULE)) (We could push these cases to kconfig, but there might also be other cases where changing the existing semantics of CONFIG_FOO could cause breakages.) We see daily in kconfig that mixing tristates with bools is tricky (especially since bools are used with different intended semantics), and I don't think doing the same in the source files would be an improvement. We might be able to do (without any CFG_FOO_MODULE at all): Enabled m: #undef CONFIG_FOO #define CFG_FOO 0 #define CONFIG_FOO_MODULE And let everyone who want's "either y or m" semantics to convert the tristate to a bool with this semantics in kconfig himself: config FOO tristate config BAR def_bool FOO Especially since this is actually a relatively unusual (and not nice) case since usually adding a module does not (and should) not change the kernel image. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed --
| Greg Kroah-Hartman | [PATCH 006/196] Chinese: add translation of oops-tracing.txt |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Borislav Petkov | 2.6.23-rc1: no setup signature found... |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | Re: [BUG] New Kernel Bugs |
