[U-Boot] [PATCH 0/4] Remove select CRC32 and CONFIG_CRC32

Robert points out that we have code selecting CRC32 but nothing that actually defines this config option. Similarly image.h #defines CONFIG_CRC32 but nothing tests for it.
lib/Makefile has had obj-y += crc32.o for some time. I can't find any evidence that u-boot ever had CONFIG_CRC32.
I suspect some of this may have come in when code has been imported from Linux (particularly the UBI/UBIFS code).
Chris Packham (4): cmd: ubifs: Remove select for non-existent option mtd: ubi: Remove select for non existent option Remove #define CONFIG_CRC32 Remove whitelist entry for CONFIG_CRC32
cmd/Kconfig | 2 -- drivers/mtd/ubi/Kconfig | 1 - include/image.h | 1 - scripts/config_whitelist.txt | 1 - 4 files changed, 5 deletions(-)

There is no 'config CRC32', remove the select that was attempting to use it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com ---
cmd/Kconfig | 2 -- 1 file changed, 2 deletions(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig index 2bdbfcb3d091..71a7f1cc83c5 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1917,7 +1917,6 @@ endmenu
config CMD_UBI tristate "Enable UBI - Unsorted block images commands" - select CRC32 select MTD_UBI help UBI is a software layer above MTD layer which admits use of LVM-like @@ -1933,7 +1932,6 @@ config CMD_UBIFS tristate "Enable UBIFS - Unsorted block images filesystem commands" depends on CMD_UBI default y if CMD_UBI - select CRC32 select LZO help UBIFS is a file system for flash devices which works on top of UBI.

Hello Chris,
Am 13.04.2019 um 11:13 schrieb Chris Packham:
There is no 'config CRC32', remove the select that was attempting to use it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com
cmd/Kconfig | 2 -- 1 file changed, 2 deletions(-)
Reviewed-by: Heiko Schocher hs@denx.de
bye, Heiko

On Sat, Apr 13, 2019 at 09:13:56PM +1200, Chris Packham wrote:
There is no 'config CRC32', remove the select that was attempting to use it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com Reviewed-by: Heiko Schocher hs@denx.de
Applied to u-boot/master, thanks!

There is no 'config CRC32' remove the select that was attempting to use it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com ---
drivers/mtd/ubi/Kconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig index cf847833562d..2b17eae94701 100644 --- a/drivers/mtd/ubi/Kconfig +++ b/drivers/mtd/ubi/Kconfig @@ -9,7 +9,6 @@ config CONFIG_UBI_SILENCE_MSG
config MTD_UBI bool "Enable UBI - Unsorted block images" - select CRC32 select RBTREE select MTD_PARTITIONS help

Hello Chris,
Am 13.04.2019 um 11:13 schrieb Chris Packham:
There is no 'config CRC32' remove the select that was attempting to use it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com
drivers/mtd/ubi/Kconfig | 1 - 1 file changed, 1 deletion(-)
Reviewed-by: Heiko Schocher hs@denx.de
bye, Heiko

On Sat, Apr 13, 2019 at 09:13:57PM +1200, Chris Packham wrote:
There is no 'config CRC32' remove the select that was attempting to use it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com Reviewed-by: Heiko Schocher hs@denx.de
Applied to u-boot/master, thanks!

There is no check for CONFIG_CRC32 so the #define in image.h does nothing. Remove it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com ---
include/image.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/include/image.h b/include/image.h index 765ffecee0a7..6b2661ed0bd6 100644 --- a/include/image.h +++ b/include/image.h @@ -68,7 +68,6 @@ struct fdt_region; # define IMAGE_ENABLE_SHA1 1 # endif # else -# define CONFIG_CRC32 /* FIT images need CRC32 support */ # define IMAGE_ENABLE_CRC32 1 # define IMAGE_ENABLE_MD5 1 # define IMAGE_ENABLE_SHA1 1

Am 13.04.19 um 11:13 schrieb Chris Packham:
There is no check for CONFIG_CRC32 so the #define in image.h does nothing. Remove it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com
include/image.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/include/image.h b/include/image.h index 765ffecee0a7..6b2661ed0bd6 100644 --- a/include/image.h +++ b/include/image.h @@ -68,7 +68,6 @@ struct fdt_region; # define IMAGE_ENABLE_SHA1 1 # endif # else -# define CONFIG_CRC32 /* FIT images need CRC32 support */ # define IMAGE_ENABLE_CRC32 1 # define IMAGE_ENABLE_MD5 1 # define IMAGE_ENABLE_SHA1 1
Reviewed-by: Stefano Babic sbabic@denx.de
Best regards, Stefano

Hello Chris,
Am 13.04.2019 um 11:13 schrieb Chris Packham:
There is no check for CONFIG_CRC32 so the #define in image.h does nothing. Remove it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com
include/image.h | 1 - 1 file changed, 1 deletion(-)
Reviewed-by: Heiko Schocher hs@denx.de
bye, Heiko

On Sat, Apr 13, 2019 at 09:13:58PM +1200, Chris Packham wrote:
There is no check for CONFIG_CRC32 so the #define in image.h does nothing. Remove it.
Reported-by: Robert P. J. Day rpjday@crashcourse.ca Signed-off-by: Chris Packham judge.packham@gmail.com Reviewed-by: Stefano Babic sbabic@denx.de Reviewed-by: Heiko Schocher hs@denx.de
Applied to u-boot/master, thanks!

There are no longer any references to this in the code so this can be removed.
Signed-off-by: Chris Packham judge.packham@gmail.com ---
scripts/config_whitelist.txt | 1 - 1 file changed, 1 deletion(-)
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 48622b12bb64..634bb8d53b57 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -292,7 +292,6 @@ CONFIG_CPU_SH7785 CONFIG_CPU_TYPE_R CONFIG_CPU_VR41XX CONFIG_CQSPI_REF_CLK -CONFIG_CRC32 CONFIG_CS8900_BUS16 CONFIG_CS8900_BUS32 CONFIG_CSF_SIZE

Hello Chris,
Am 13.04.2019 um 11:13 schrieb Chris Packham:
There are no longer any references to this in the code so this can be removed.
Signed-off-by: Chris Packham judge.packham@gmail.com
scripts/config_whitelist.txt | 1 - 1 file changed, 1 deletion(-)
Reviewed-by: Heiko Schocher hs@denx.de
bye, Heiko

On Sat, Apr 13, 2019 at 09:13:59PM +1200, Chris Packham wrote:
There are no longer any references to this in the code so this can be removed.
Signed-off-by: Chris Packham judge.packham@gmail.com Reviewed-by: Heiko Schocher hs@denx.de
Applied to u-boot/master, thanks!

On Sat, 13 Apr 2019, Chris Packham wrote:
Robert points out that we have code selecting CRC32 but nothing that actually defines this config option. Similarly image.h #defines CONFIG_CRC32 but nothing tests for it.
... snip ...
thanks for all that effort ... my script can *find* stuff like that, but i'm nowhere confident that i'd know how to resolve it once it's found.
one last cleanup post coming shortly ...
rday
participants (5)
-
Chris Packham
-
Heiko Schocher
-
Robert P. J. Day
-
stefano babic
-
Tom Rini