cmd: mvebu/bubt: Correct usage of IS_ENABLED() macro
PATCH 1/1 cmd: mvebu/bubt: Correct usage of IS_ENABLED() macro
This file was using IS_ENABLED() to test for CONFIG flags but omitted the CONFIG_ prefix and so did not work as expected.
---
Cc: Tim Harvey <[email protected]>
Cc: Stefan Roese <[email protected]>
This does change how some platforms are built.
--- cmd/mvebu/bubt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/mvebu/bubt.c +1 -1
@@ -931,7 +931,7 @@ static int check_image_header(void) size =le32_to_cpu (hdr->blocksize);if (hdr->blockid ==0x78 ) {/* SATA id */ -struct blk_desc *blk_dev =IS_ENABLED (BLK ) ?blk_get_devnum_by_uclass_id (UCLASS_SCSI ,0 ) :NULL ; +struct blk_desc *blk_dev =IS_ENABLED (CONFIG_BLK ) ?blk_get_devnum_by_uclass_id (UCLASS_SCSI ,0 ) :NULL ;unsigned long blksz = blk_dev ? blk_dev->blksz :512 ; offset *= blksz; }
Signature · 1 line
2.43.0
Quoted 9 lines · Tom Rini
This file was using
IS_ENABLED()to test for CONFIG flags but omitted theCONFIG_prefix and so did not work as expected.Signed-off-by Tom Rini <[email protected]>---
Cc: Tim Harvey <[email protected]>
Cc: Stefan Roese <[email protected]>This does change how some platforms are built.
Thanks,
Stefan
Quoted 9 lines
--- cmd/mvebu/bubt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/mvebu/bubt.c +0
-0
cmd/mvebu/bubt.c static int check_image_header(void) · line 937
Quoted 8 lines
cmd/mvebu/bubt.c +1
-1@@ -931,7 +931,7 @@ static int check_image_header(void) size =le32_to_cpu (hdr->blocksize);if (hdr->blockid ==0x78 ) {/* SATA id */ -struct blk_desc *blk_dev =IS_ENABLED (BLK ) ?blk_get_devnum_by_uclass_id (UCLASS_SCSI ,0 ) :NULL ; +struct blk_desc *blk_dev =IS_ENABLED (CONFIG_BLK ) ?blk_get_devnum_by_uclass_id (UCLASS_SCSI ,0 ) :NULL ;unsigned long blksz = blk_dev ? blk_dev->blksz :512 ; offset *= blksz; }
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Quoted 4 lines · Tom Rini
This file was using
IS_ENABLED()to test for CONFIG flags but omitted theCONFIG_prefix and so did not work as expected.Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-marvell/master
Thanks,
Stefan
Quoted 14 lines
---
Cc: Tim Harvey <[email protected]>
Cc: Stefan Roese <[email protected]>This does change how some platforms are built.
--- cmd/mvebu/bubt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/mvebu/bubt.c +0
-0
cmd/mvebu/bubt.c static int check_image_header(void) · line 937
Quoted 8 lines
cmd/mvebu/bubt.c +1
-1@@ -931,7 +931,7 @@ static int check_image_header(void) size =le32_to_cpu (hdr->blocksize);if (hdr->blockid ==0x78 ) {/* SATA id */ -struct blk_desc *blk_dev =IS_ENABLED (BLK ) ?blk_get_devnum_by_uclass_id (UCLASS_SCSI ,0 ) :NULL ; +struct blk_desc *blk_dev =IS_ENABLED (CONFIG_BLK ) ?blk_get_devnum_by_uclass_id (UCLASS_SCSI ,0 ) :NULL ;unsigned long blksz = blk_dev ? blk_dev->blksz :512 ; offset *= blksz; }
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]