* Re: How to remove 2000+ lines from 400+ defconfig files? [not found] <1321362602.20271.192.camel@x61.thuisdomein> @ 2011-11-15 13:14 ` Jiri Kosina 2011-11-15 15:37 ` Paul Bolle 0 siblings, 1 reply; 7+ messages in thread From: Jiri Kosina @ 2011-11-15 13:14 UTC (permalink / raw) To: Paul Bolle; +Cc: Michal Marek, linux-kernel On Tue, 15 Nov 2011, Paul Bolle wrote: > Michal, Jiri, [ adding LKML to CC ] > 0) While, slowly, working through the accumulated Kconfig cruft I > noticed quite a number of outdated (Kconfig) macros in (almost) all > defconfig files. A few days ago I counted 161 outdated Kconfig macros, > totaling 2189 lines in 426 defconfig files. Please see below for a draft > commit log, with a sort-of-impressive stat. (A few of these macros are > still used in the code. I already sent out messages to try to clean up > that too.) > > 1) They create false negatives while grepping for outdated stuff. At > some point I decided to write a script to remove all of them. > > 2) Is it worth the trouble to try to remove all that from the mainline > tree? If it is, how would you propose I try to get something like this > commit merged? I am fine taking those through trivial.git and handling the fallout. The only ones I'd have objections to taking immediately are those which are actually still referenced somewhere in the code. For those, either taking them through appropriate maintainers, or having their Acked-by would be required. Thanks, -- Jiri Kosina SUSE Labs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to remove 2000+ lines from 400+ defconfig files? 2011-11-15 13:14 ` How to remove 2000+ lines from 400+ defconfig files? Jiri Kosina @ 2011-11-15 15:37 ` Paul Bolle 2011-11-15 18:39 ` Michal Marek 0 siblings, 1 reply; 7+ messages in thread From: Paul Bolle @ 2011-11-15 15:37 UTC (permalink / raw) To: Jiri Kosina; +Cc: Michal Marek, linux-kernel On Tue, 2011-11-15 at 14:14 +0100, Jiri Kosina wrote: > I am fine taking those through trivial.git and handling the fallout. Great. > The only ones I'd have objections to taking immediately are those which are > actually still referenced somewhere in the code. > For those, either taking them through appropriate maintainers, or having > their Acked-by would be required. I don't mind. That shouldn't be a lot of extra work for me. But, I do have a naive question: are defconfigs meant to be drop in replacements for .config files or is one supposed to first feed them to the config tools to generate an up to date .config? Since, if one is supposed to feed them to the config tools first it doesn't matter whether the (outdated) macros are still used somewhere in the code, doesn't it? The config tools will simply drop all macros they can't match with Kconfig symbols. (Or don't they? Michal?) Paul Bolle ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to remove 2000+ lines from 400+ defconfig files? 2011-11-15 15:37 ` Paul Bolle @ 2011-11-15 18:39 ` Michal Marek 2011-11-15 18:57 ` Dave Jones 2011-11-15 19:26 ` Paul Bolle 0 siblings, 2 replies; 7+ messages in thread From: Michal Marek @ 2011-11-15 18:39 UTC (permalink / raw) To: Paul Bolle; +Cc: Jiri Kosina, linux-kernel Dne 15.11.2011 16:37, Paul Bolle napsal(a): > On Tue, 2011-11-15 at 14:14 +0100, Jiri Kosina wrote: >> I am fine taking those through trivial.git and handling the fallout. > > Great. > >> The only ones I'd have objections to taking immediately are those which are >> actually still referenced somewhere in the code. >> For those, either taking them through appropriate maintainers, or having >> their Acked-by would be required. > > I don't mind. That shouldn't be a lot of extra work for me. > > But, I do have a naive question: are defconfigs meant to be drop in > replacements for .config files or is one supposed to first feed them to > the config tools to generate an up to date .config? defconfig files are used as input of the conf program. Since, if one is > supposed to feed them to the config tools first it doesn't matter > whether the (outdated) macros are still used somewhere in the code, > doesn't it? The config tools will simply drop all macros they can't > match with Kconfig symbols. (Or don't they? Michal?) Yes, they will not appear in the .config. Michal ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to remove 2000+ lines from 400+ defconfig files? 2011-11-15 18:39 ` Michal Marek @ 2011-11-15 18:57 ` Dave Jones 2011-11-15 19:21 ` Paul Bolle 2011-11-15 19:26 ` Paul Bolle 1 sibling, 1 reply; 7+ messages in thread From: Dave Jones @ 2011-11-15 18:57 UTC (permalink / raw) To: Michal Marek; +Cc: Paul Bolle, Jiri Kosina, linux-kernel On Tue, Nov 15, 2011 at 07:39:51PM +0100, Michal Marek wrote: > >> The only ones I'd have objections to taking immediately are those which are > >> actually still referenced somewhere in the code. > >> For those, either taking them through appropriate maintainers, or having > >> their Acked-by would be required. > > > > I don't mind. That shouldn't be a lot of extra work for me. > > > > But, I do have a naive question: are defconfigs meant to be drop in > > replacements for .config files or is one supposed to first feed them to > > the config tools to generate an up to date .config? > > defconfig files are used as input of the conf program. It seems to me that these files have always been very neglected. Perhaps a better solution would be to have 'make defconfig' generate them itself. This would mean adding addition 'default' parameters to a ton of existing options, and possibly also some 'if CONFIG_$ARCH' magic, but that sounds like it would be more future-proof, and would also serve as better documentation. (As a distro kernel maintainer, the number of times I've hit undocumented "enable this on arch x, but leave disabled on arch y" is annoying). Dave ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to remove 2000+ lines from 400+ defconfig files? 2011-11-15 18:57 ` Dave Jones @ 2011-11-15 19:21 ` Paul Bolle 0 siblings, 0 replies; 7+ messages in thread From: Paul Bolle @ 2011-11-15 19:21 UTC (permalink / raw) To: Dave Jones; +Cc: Michal Marek, Jiri Kosina, linux-kernel On Tue, 2011-11-15 at 13:57 -0500, Dave Jones wrote: > It seems to me that these files have always been very neglected. Almost all of them (ie, 426 of 437) had one or more outdated macros (ie, mentioned a macro that I could not link to a current Kconfig symbol). With some, or perhaps a lot of, effort we might learn how long they've been neglected. For that we need to know when every one of those 161 Kconfig symbols got dropped and see what the oldest Kconfig symbol (turned into a macro) is in each of those 426 Kconfig files. But I'm not sure if that actually would tell us much. I guess it's easier to just conclude that, yes, they are rather neglected. Paul Bolle ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to remove 2000+ lines from 400+ defconfig files? 2011-11-15 18:39 ` Michal Marek 2011-11-15 18:57 ` Dave Jones @ 2011-11-15 19:26 ` Paul Bolle 2011-11-15 20:54 ` Michal Marek 1 sibling, 1 reply; 7+ messages in thread From: Paul Bolle @ 2011-11-15 19:26 UTC (permalink / raw) To: Michal Marek; +Cc: Jiri Kosina, linux-kernel On Tue, 2011-11-15 at 19:39 +0100, Michal Marek wrote: > > But, I do have a naive question: are defconfigs meant to be drop in > > replacements for .config files or is one supposed to first feed them to > > the config tools to generate an up to date .config? > > defconfig files are used as input of the conf program. > > > Since, if one is > > supposed to feed them to the config tools first it doesn't matter > > whether the (outdated) macros are still used somewhere in the code, > > doesn't it? The config tools will simply drop all macros they can't > > match with Kconfig symbols. (Or don't they? Michal?) > > Yes, they will not appear in the .config. So the fact that a few of these macros are still currently used in the code shouldn't bother us. The maintainers of that code have no reason to complain about dropping those macros from the various defconfig files, because that removal doesn't actually matter. Correct? Paul Bolle ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to remove 2000+ lines from 400+ defconfig files? 2011-11-15 19:26 ` Paul Bolle @ 2011-11-15 20:54 ` Michal Marek 0 siblings, 0 replies; 7+ messages in thread From: Michal Marek @ 2011-11-15 20:54 UTC (permalink / raw) To: Paul Bolle; +Cc: Jiri Kosina, linux-kernel Dne 15.11.2011 20:26, Paul Bolle napsal(a): > On Tue, 2011-11-15 at 19:39 +0100, Michal Marek wrote: >>> Since, if one is >>> supposed to feed them to the config tools first it doesn't matter >>> whether the (outdated) macros are still used somewhere in the code, >>> doesn't it? The config tools will simply drop all macros they can't >>> match with Kconfig symbols. (Or don't they? Michal?) >> >> Yes, they will not appear in the .config. > > So the fact that a few of these macros are still currently used in the > code shouldn't bother us. The maintainers of that code have no reason to > complain about dropping those macros from the various defconfig files, > because that removal doesn't actually matter. Correct? Correct. Michal ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-15 20:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1321362602.20271.192.camel@x61.thuisdomein>
2011-11-15 13:14 ` How to remove 2000+ lines from 400+ defconfig files? Jiri Kosina
2011-11-15 15:37 ` Paul Bolle
2011-11-15 18:39 ` Michal Marek
2011-11-15 18:57 ` Dave Jones
2011-11-15 19:21 ` Paul Bolle
2011-11-15 19:26 ` Paul Bolle
2011-11-15 20:54 ` Michal Marek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox