[U-Boot] [PATCH 0/2] config whitelist: tool update and sync

The current build-whitelist.sh allows to add new options into the whitelist. For example, it is possible that somebody adds #ifdef CONFIG_NEW_OPTITON to his C file. So, the build-whitelist.sh will pick it up when we run it next time. We never want to increase the ad-hoc options. 1/2 bans such a case.
2/2 is optional. It is very easy to reproduce it.
Masahiro Yamada (2): build-whitelist: do not add new options to whitelist when update Sync config_whitelist.txt
scripts/build-whitelist.sh | 10 ++++++++-- scripts/config_whitelist.txt | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-)

If somebody adds a reference to a new CONFIG option in .c files, it will be added in the whitelist when we sync it. (For example, if we run scripts/build-whitelist.sh against commit a2ed3f452dd1, a new option CONFIG_USB_XHCI_UNIPHIER will appear in the list.)
In order to make steady progress of Kconfig migration, we want to only decrease options in the whitelist, never increase.
So, when we update the whitelist, we should create a temporary list, then take the intersection of the temporary list and the current whitelist.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
scripts/build-whitelist.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/scripts/build-whitelist.sh b/scripts/build-whitelist.sh index 7cf7a66..b681ed4 100755 --- a/scripts/build-whitelist.sh +++ b/scripts/build-whitelist.sh @@ -45,7 +45,13 @@ cat `find . -name "Kconfig*"` |sed -n \
# Use only the options that are present in the first file but not the second. comm -23 scripts/config_whitelist.txt.tmp1 scripts/config_whitelist.txt.tmp2 \ - |sort |uniq >scripts/config_whitelist.txt -rm scripts/config_whitelist.txt.tmp1 scripts/config_whitelist.txt.tmp2 + |sort |uniq >scripts/config_whitelist.txt.tmp3 + +comm -12 scripts/config_whitelist.txt.tmp3 scripts/config_whitelist.txt \ + > scripts/config_whitelist.txt.tmp4 + +mv scripts/config_whitelist.txt.tmp4 scripts/config_whitelist.txt + +rm scripts/config_whitelist.txt.tmp*
unset LC_ALL LC_COLLATE

It is a good practice to drop a option from the whitelist when we convert it to Kconfig, but we may sometimes forget to do that.
So, it might be a good idea to sync the whitelist from time to time.
This commit was generated by: scripts/build-whitelist.sh
Looks like we had a bit progress...
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
You do not need to apply this, but this is a reminder for periodical sync, like we sync defconfigs from time to time.
Tom can directly run scripts/build-whitelist.sh in the u-boot/master while drinking coffee.
scripts/config_whitelist.txt | 2 -- 1 file changed, 2 deletions(-)
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index cb4516f..783fb5a 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -891,7 +891,6 @@ CONFIG_DMC_DDRTR2 CONFIG_DNET_AUTONEG_TIMEOUT CONFIG_DNP5370_EXT_WD_DISABLE CONFIG_DOS_PARTITION -CONFIG_DPLL_SSC_RATE_1PER CONFIG_DP_DDR_CTRL CONFIG_DP_DDR_DIMM_SLOTS_PER_CTLR CONFIG_DP_DDR_NUM_CTRLS @@ -1656,7 +1655,6 @@ CONFIG_ICACHE CONFIG_ICACHE_OFF CONFIG_ICON CONFIG_ICS307_REFCLK_HZ -CONFIG_IDENT_STRING CONFIG_IDE_8xx_DIRECT CONFIG_IDE_8xx_PCCARD CONFIG_IDE_INIT_POSTRESET
participants (1)
-
Masahiro Yamada