[PATCH] global: Remove dead code that starts with CONFIG_[0-9A]
Tom Rini
trini at konsulko.com
Fri Aug 20 15:57:56 CEST 2021
On Fri, Aug 20, 2021 at 03:01:19PM +0200, Rasmus Villemoes wrote:
> On 19/08/2021 21.02, Tom Rini wrote:
> > This removes a number of spots of dead code based on symbols that start
> > with CONFIG_[0-9] or CONFIG_A.
>
> How did you find those symbols? I suppose the actual patch is just
> generated with unifdef or similar.
The entire list is at scripts/config_whitelist.txt and I just used `git
grep -Ovim ...` and removed by hand.
> > include/configs/vexpress_common.h | 3 -
> > 14 files changed, 3 insertions(+), 253 deletions(-)
>
> Shouldn't they also be removed from scripts/config_whitelist.txt ?
I don't bother because there's so many conflicts and it's a generated
by scripts/build-whitelist.sh
> More generally, running
>
> for x in $(cat scripts/config_whitelist.txt) ; do git grep -w -q $x -- .
> ':!scripts/config_whitelist.txt' || echo $x ; done
>
> [I'm sure there's a more efficient way...] shows a few symbols that
> could be removed from that file, along with the places where they are
> set via a CONFIG_SYS_EXTRA_OPTIONS.
Yes, finishing the migration of CONFIG_SYS_EXTRA_OPTIONS is also on the
list. I'm just running down the list looking for chunks of symbols that
hopefully aren't in the categories of:
- Abusing tests for CONFIG_SPL_BUILD to set/unset based on SPL build or
not.
- Sometimes a value, sometimes a function name.
- Some other kind of game cpp lets you do, but that's not so easy to
move to Kconfig.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210820/dff5df0a/attachment.sig>
More information about the U-Boot
mailing list