Skip to contentSkip to conversation

Remove select CRC32 and CONFIG_CRC32

PATCH New Chris Packham 5 participants 15 messages Apr 13, 2019 – May 10, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/4 cmd: ubifs: Remove select for non-existent option

There is no 'config CRC32', remove the select that was attempting to use it.

---

 cmd/Kconfig | 2 --
 1 file changed, 2 deletions(-)
cmd/Kconfig +0 -2
index 2bdbfcb3d091..71a7f1cc83c5 100644
@@ -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.
Signature · 1 line
2.21.0
#2 lore raw

PATCH 1/4 cmd: ubifs: Remove select for non-existent option

Hello Chris,

Am 13.04.2019 um 11:13 schrieb Chris Packham:

Quoted 9 lines

There is no 'config CRC32', remove the select that was attempting to use it.

---

  cmd/Kconfig | 2 --
  1 file changed, 2 deletions(-)

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#3 lore raw

PATCH 1/4 cmd: ubifs: Remove select for non-existent option

In reply to Chris Packham
Quoted 6 lines · Chris Packham

There is no 'config CRC32', remove the select that was attempting to use it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190510/ba3a80c1/attachment.sig>
#4 lore raw

PATCH 2/4 mtd: ubi: Remove select for non existent option

In reply to Chris Packham

There is no 'config CRC32' remove the select that was attempting to use it.

---

 drivers/mtd/ubi/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/mtd/ubi/Kconfig +0 -1
index cf847833562d..2b17eae94701 100644
@@ -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
Signature · 1 line
2.21.0
#5 lore raw

PATCH 2/4 mtd: ubi: Remove select for non existent option

Hello Chris,

Am 13.04.2019 um 11:13 schrieb Chris Packham:

Quoted 9 lines

There is no 'config CRC32' remove the select that was attempting to use it.

---

  drivers/mtd/ubi/Kconfig | 1 -
  1 file changed, 1 deletion(-)

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#6 lore raw

PATCH 2/4 mtd: ubi: Remove select for non existent option

In reply to Chris Packham
Quoted 6 lines · Chris Packham

There is no 'config CRC32' remove the select that was attempting to use it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190510/d6e25ae0/attachment.sig>
#7 lore raw

PATCH 3/4 Remove #define CONFIG_CRC32

In reply to Chris Packham

There is no check for CONFIG_CRC32 so the #define in image.h does nothing. Remove it.

---

 include/image.h | 1 -
 1 file changed, 1 deletion(-)
include/image.h +0 -1
index 765ffecee0a7..6b2661ed0bd6 100644
@@ -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
Signature · 1 line
2.21.0
#8 lore raw

PATCH 3/4 Remove #define CONFIG_CRC32

Am 13.04.19 um 11:13 schrieb Chris Packham:

Quoted 16 lines

There is no check for CONFIG_CRC32 so the #define in image.h does nothing. Remove it.

---

 include/image.h | 1 -
 1 file changed, 1 deletion(-)
include/image.h +0 -0
index 765ffecee0a7..6b2661ed0bd6 100644

include/image.h struct fdt_region; · line 73

Quoted 7 lines
include/image.h +0 -1
@@ -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

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#9 lore raw

PATCH 3/4 Remove #define CONFIG_CRC32

In reply to Chris Packham

Hello Chris,

Am 13.04.2019 um 11:13 schrieb Chris Packham:

Quoted 9 lines

There is no check for CONFIG_CRC32 so the #define in image.h does nothing. Remove it.

---

  include/image.h | 1 -
  1 file changed, 1 deletion(-)

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#10 lore raw

PATCH 3/4 Remove #define CONFIG_CRC32

In reply to Chris Packham
Quoted 7 lines · Chris Packham

There is no check for CONFIG_CRC32 so the #define in image.h does nothing. Remove it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190510/83645da2/attachment.sig>
#11 lore raw

PATCH 4/4 Remove whitelist entry for CONFIG_CRC32

In reply to Chris Packham

There are no longer any references to this in the code so this can be removed.

---

 scripts/config_whitelist.txt | 1 -
 1 file changed, 1 deletion(-)
scripts/config_whitelist.txt +0 -1
index 48622b12bb64..634bb8d53b57 100644
@@ -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
Signature · 1 line
2.21.0
#12 lore raw

PATCH 4/4 Remove whitelist entry for CONFIG_CRC32

Hello Chris,

Am 13.04.2019 um 11:13 schrieb Chris Packham:

Quoted 8 lines

There are no longer any references to this in the code so this can be removed.

---

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

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#13 lore raw

PATCH 4/4 Remove whitelist entry for CONFIG_CRC32

In reply to Chris Packham
Quoted 5 lines · Chris Packham

There are no longer any references to this in the code so this can be removed.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190510/247351f2/attachment.sig>
#14 lore raw

cover Remove select CRC32 and CONFIG_CRC32

In reply to Chris Packham
Quoted 3 lines · Chris Packham

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

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                         http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================