public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/3] config whitelist: tool update and sync
@ 2016-09-26  2:52 Masahiro Yamada
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 1/3] build-whitelist: do not add new options to whitelist when update Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Masahiro Yamada @ 2016-09-26  2:52 UTC (permalink / raw)
  To: u-boot

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.


Masahiro Yamada (3):
  build-whitelist: do not add new options to whitelist when update
  config_whitelist: sync by tool
  config_whitelist: remove bogus options

 scripts/build-whitelist.sh   | 15 +++++++++++++--
 scripts/config_whitelist.txt | 16 ----------------
 2 files changed, 13 insertions(+), 18 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v3 1/3] build-whitelist: do not add new options to whitelist when update
  2016-09-26  2:52 [U-Boot] [PATCH v3 0/3] config whitelist: tool update and sync Masahiro Yamada
@ 2016-09-26  2:52 ` Masahiro Yamada
  2016-10-08 17:06   ` [U-Boot] [U-Boot, v3, " Tom Rini
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 2/3] config_whitelist: sync by tool Masahiro Yamada
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 3/3] config_whitelist: remove bogus options Masahiro Yamada
  2 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2016-09-26  2:52 UTC (permalink / raw)
  To: u-boot

If somebody adds references to new CONFIG options in source files,
they will be added in the whitelist when we sync it.  (For example,
if we run scripts/build-whitelist.sh against commit 42f75050667b,
new options CONFIG_SPL_DFU_SUPPORT and CONFIG_USB_XHCI_UNIPHIER will
appear in the list.)

In order to make steady progress of Kconfig migration, we want to
only decrease whitelist options, but never increase.

So, when we update the whitelist, we should create a temporary list,
then take the intersection of the temporary one and the current one.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2:
  - V1 fails to create scripts/config-whitelist.txt from scratch.
    Fix it.

 scripts/build-whitelist.sh | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/scripts/build-whitelist.sh b/scripts/build-whitelist.sh
index 7cf7a66..f169eaa 100755
--- a/scripts/build-whitelist.sh
+++ b/scripts/build-whitelist.sh
@@ -45,7 +45,18 @@ 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
+
+# If scripts/config_whitelist.txt already exists, take the intersection of the
+# current list and the new one.  We do not want to increase whitelist options.
+if [ -r scripts/config_whitelist.txt ]; then
+	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
+else
+	mv scripts/config_whitelist.txt.tmp3 scripts/config_whitelist.txt
+fi
+
+rm scripts/config_whitelist.txt.tmp*
 
 unset LC_ALL LC_COLLATE
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v3 2/3] config_whitelist: sync by tool
  2016-09-26  2:52 [U-Boot] [PATCH v3 0/3] config whitelist: tool update and sync Masahiro Yamada
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 1/3] build-whitelist: do not add new options to whitelist when update Masahiro Yamada
@ 2016-09-26  2:52 ` Masahiro Yamada
  2016-10-08 17:06   ` [U-Boot] [U-Boot,v3,2/3] " Tom Rini
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 3/3] config_whitelist: remove bogus options Masahiro Yamada
  2 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2016-09-26  2:52 UTC (permalink / raw)
  To: u-boot

It is a good practice to drop an 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>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

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.


Changes in v3: None
Changes in v2: None

 scripts/config_whitelist.txt | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index cb4516f..d91f99a 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
@@ -1256,7 +1255,6 @@ CONFIG_FO300
 CONFIG_FOO
 CONFIG_FORCE_DDR_DATA_BUS_WIDTH_32
 CONFIG_FORMIKE
-CONFIG_FPGA
 CONFIG_FPGA_ALTERA
 CONFIG_FPGA_COUNT
 CONFIG_FPGA_CYCLON2
@@ -1265,7 +1263,6 @@ CONFIG_FPGA_SOCFPGA
 CONFIG_FPGA_SPARTAN2
 CONFIG_FPGA_SPARTAN3
 CONFIG_FPGA_STRATIX_V
-CONFIG_FPGA_XILINX
 CONFIG_FPGA_ZYNQPL
 CONFIG_FSLDMAFEC
 CONFIG_FSL_CADMUS
@@ -1656,7 +1653,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
@@ -3991,8 +3987,6 @@ CONFIG_SCSI_SYM53C8XX
 CONFIG_SC_TIMER_CLK
 CONFIG_SDCARD
 CONFIG_SDHCI
-CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT
-CONFIG_SDHCI_CMD_MAX_TIMEOUT
 CONFIG_SDRAM_BANK0
 CONFIG_SDRAM_BANK1
 CONFIG_SDRAM_ECC
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v3 3/3] config_whitelist: remove bogus options
  2016-09-26  2:52 [U-Boot] [PATCH v3 0/3] config whitelist: tool update and sync Masahiro Yamada
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 1/3] build-whitelist: do not add new options to whitelist when update Masahiro Yamada
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 2/3] config_whitelist: sync by tool Masahiro Yamada
@ 2016-09-26  2:52 ` Masahiro Yamada
  2016-09-27  0:32   ` Simon Glass
  2016-10-08 17:06   ` [U-Boot] [U-Boot, v3, " Tom Rini
  2 siblings, 2 replies; 8+ messages in thread
From: Masahiro Yamada @ 2016-09-26  2:52 UTC (permalink / raw)
  To: u-boot

These are not CONFIG options (detected by my eyes).

CONFIG_SPL_BUILD and CONFIG_TPL_BUILD are build options defined only
for building SPL and TPL, respectively.

The others are just mentioned in comment blocks.

Now, scripts/build-whitelist.sh never picks up new options.  Once
we kill these false ones, they will never revive.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Changes in v3:
  - Newly added

 scripts/config_whitelist.txt | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index d91f99a..84860ee 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1,4 +1,3 @@
-CONFIG_
 CONFIG_16BIT
 CONFIG_33
 CONFIG_400MHZ_MODE
@@ -1252,7 +1251,6 @@ CONFIG_FLASH_VERIFY
 CONFIG_FMAN_ENET
 CONFIG_FM_PLAT_CLK_DIV
 CONFIG_FO300
-CONFIG_FOO
 CONFIG_FORCE_DDR_DATA_BUS_WIDTH_32
 CONFIG_FORMIKE
 CONFIG_FPGA_ALTERA
@@ -1725,7 +1723,6 @@ CONFIG_IRAM_TOP
 CONFIG_IRDA_BASE
 CONFIG_ISO_PARTITION
 CONFIG_ISP1362_USB
-CONFIG_IS_
 CONFIG_IS_BUILTIN
 CONFIG_IS_ENABLED
 CONFIG_IS_INVALID
@@ -4245,7 +4242,6 @@ CONFIG_SPL_BOOTROM_SAVE
 CONFIG_SPL_BOOT_DEVICE
 CONFIG_SPL_BSS_MAX_SIZE
 CONFIG_SPL_BSS_START_ADDR
-CONFIG_SPL_BUILD
 CONFIG_SPL_CMT
 CONFIG_SPL_CMT_DEBUG
 CONFIG_SPL_COMMON_INIT_DDR
@@ -4253,7 +4249,6 @@ CONFIG_SPL_CONSOLE
 CONFIG_SPL_DISPLAY_PRINT
 CONFIG_SPL_ETH_DEVICE
 CONFIG_SPL_FLUSH_IMAGE
-CONFIG_SPL_FOO
 CONFIG_SPL_FRAMEWORK
 CONFIG_SPL_FSL_PBL
 CONFIG_SPL_FS_LOAD_ARGS_NAME
@@ -7922,7 +7917,6 @@ CONFIG_SYS_XIMG_LEN
 CONFIG_SYS_XLB_PIPELINING
 CONFIG_SYS_XSVF_DEFAULT_ADDR
 CONFIG_SYS_XWAY_EBU_BOOTCFG
-CONFIG_SYS_XXX
 CONFIG_SYS_ZYNQ_QSPI_WAIT
 CONFIG_SYS_ZYNQ_SPI_WAIT
 CONFIG_SYS_i2C_FSL
@@ -7992,7 +7986,6 @@ CONFIG_TI_SPI_MMAP
 CONFIG_TMU_CMD_DTT
 CONFIG_TMU_TIMER
 CONFIG_TOTAL5200
-CONFIG_TPL_BUILD
 CONFIG_TPL_DRIVERS_MISC_SUPPORT
 CONFIG_TPL_PAD_TO
 CONFIG_TPM_TIS_BASE_ADDRESS
@@ -8406,6 +8399,3 @@ CONFIG_ZYNQ_SDHCI_MAX_FREQ
 CONFIG_ZYNQ_SDHCI_MIN_FREQ
 CONFIG_ZYNQ_SERIAL
 CONFIG_eTSEC_MDIO_BUS
-CONFIG_n
-CONFIG_prefix
-CONFIG_xxx
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH v3 3/3] config_whitelist: remove bogus options
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 3/3] config_whitelist: remove bogus options Masahiro Yamada
@ 2016-09-27  0:32   ` Simon Glass
  2016-10-08 17:06   ` [U-Boot] [U-Boot, v3, " Tom Rini
  1 sibling, 0 replies; 8+ messages in thread
From: Simon Glass @ 2016-09-27  0:32 UTC (permalink / raw)
  To: u-boot

On 25 September 2016 at 20:52, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> These are not CONFIG options (detected by my eyes).
>
> CONFIG_SPL_BUILD and CONFIG_TPL_BUILD are build options defined only
> for building SPL and TPL, respectively.
>
> The others are just mentioned in comment blocks.
>
> Now, scripts/build-whitelist.sh never picks up new options.  Once
> we kill these false ones, they will never revive.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> Changes in v3:
>   - Newly added
>
>  scripts/config_whitelist.txt | 10 ----------
>  1 file changed, 10 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v3, 1/3] build-whitelist: do not add new options to whitelist when update
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 1/3] build-whitelist: do not add new options to whitelist when update Masahiro Yamada
@ 2016-10-08 17:06   ` Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2016-10-08 17:06 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 11:52:28AM +0900, Masahiro Yamada wrote:

> If somebody adds references to new CONFIG options in source files,
> they will be added in the whitelist when we sync it.  (For example,
> if we run scripts/build-whitelist.sh against commit 42f75050667b,
> new options CONFIG_SPL_DFU_SUPPORT and CONFIG_USB_XHCI_UNIPHIER will
> appear in the list.)
> 
> In order to make steady progress of Kconfig migration, we want to
> only decrease whitelist options, but never increase.
> 
> So, when we update the whitelist, we should create a temporary list,
> then take the intersection of the temporary one and the current one.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161008/1f41009d/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot,v3,2/3] config_whitelist: sync by tool
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 2/3] config_whitelist: sync by tool Masahiro Yamada
@ 2016-10-08 17:06   ` Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2016-10-08 17:06 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 11:52:29AM +0900, Masahiro Yamada wrote:

> It is a good practice to drop an 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>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161008/8113a467/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [U-Boot, v3, 3/3] config_whitelist: remove bogus options
  2016-09-26  2:52 ` [U-Boot] [PATCH v3 3/3] config_whitelist: remove bogus options Masahiro Yamada
  2016-09-27  0:32   ` Simon Glass
@ 2016-10-08 17:06   ` Tom Rini
  1 sibling, 0 replies; 8+ messages in thread
From: Tom Rini @ 2016-10-08 17:06 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 26, 2016 at 11:52:30AM +0900, Masahiro Yamada wrote:

> These are not CONFIG options (detected by my eyes).
> 
> CONFIG_SPL_BUILD and CONFIG_TPL_BUILD are build options defined only
> for building SPL and TPL, respectively.
> 
> The others are just mentioned in comment blocks.
> 
> Now, scripts/build-whitelist.sh never picks up new options.  Once
> we kill these false ones, they will never revive.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161008/511c1711/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-10-08 17:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-26  2:52 [U-Boot] [PATCH v3 0/3] config whitelist: tool update and sync Masahiro Yamada
2016-09-26  2:52 ` [U-Boot] [PATCH v3 1/3] build-whitelist: do not add new options to whitelist when update Masahiro Yamada
2016-10-08 17:06   ` [U-Boot] [U-Boot, v3, " Tom Rini
2016-09-26  2:52 ` [U-Boot] [PATCH v3 2/3] config_whitelist: sync by tool Masahiro Yamada
2016-10-08 17:06   ` [U-Boot] [U-Boot,v3,2/3] " Tom Rini
2016-09-26  2:52 ` [U-Boot] [PATCH v3 3/3] config_whitelist: remove bogus options Masahiro Yamada
2016-09-27  0:32   ` Simon Glass
2016-10-08 17:06   ` [U-Boot] [U-Boot, v3, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox