boot/android_ab.c: Make use of LBAF for printing lbaint_t
PATCH 1/2 boot/android_ab.c: Make use of LBAF for printing lbaint_t
When printing the contents of an lbaint_t variable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness. Furthermore, printed message should not be split as that makes finding them harder, so bring this back to a single line.
---
Cc: Mattijs Korpershoek <[email protected]>
Cc: Igor Opaniuk <[email protected]>
Cc: Sam Protsenko <[email protected]>
--- boot/android_ab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
boot/android_ab.c +1 -2
@@ -101,8 +101,7 @@ static int ab_control_create_from_disk(struct blk_desc *dev_desc, abc_blocks =DIV_ROUND_UP (sizeof (struct bootloader_control ), part_info->blksz);if (abc_offset + abc_blocks > part_info->size) { -log_err ("ANDROID: boot control partition too small. Need at" ); -log_err (" least %lu blocks but have %lu blocks.\n" , +log_err ("ANDROID: boot control partition too small. Need at least %lu blocks but have " LBAF " blocks.\n" , abc_offset + abc_blocks, part_info->size);return -EINVAL ; }
Signature · 1 line
2.43.0
PATCH 2/2 common/avb_verify.c: Make use of LBAF for printing lbaint_t
When printing the contents of an lbaint_t variable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness.
---
Cc: Mattijs Korpershoek <[email protected]>
Cc: Igor Opaniuk <[email protected]>
Cc: Sam Protsenko <[email protected]>
--- common/avb_verify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
common/avb_verify.c +2 -2
@@ -320,7 +320,7 @@ static unsigned long mmc_read_and_flush(struct mmc_part *part, }if ((start + sectors) > (part->info.start + part->info.size)) { sectors = part->info.start + part->info.size - start; -printf ("%s: read sector aligned to partition bounds (%ld)\n" , +printf ("%s: read sector aligned to partition bounds (" LBAF ")\n" , __func__, sectors); }
@@ -363,7 +363,7 @@ static unsigned long mmc_write(struct mmc_part *part, lbaint_t start, }if ((start + sectors) > (part->info.start + part->info.size)) { sectors = part->info.start + part->info.size - start; -printf ("%s: sector aligned to partition bounds (%ld)\n" , +printf ("%s: sector aligned to partition bounds (" LBAF ")\n" , __func__, sectors); }if (unaligned) {
Signature · 1 line
2.43.0
Re: [PATCH 2/2] common/avb_verify.c: Make use of LBAF for printing lbaint_t
Hi Tom,
Thank you for the patch.
Quoted 5 lines · Tom Rini
When printing the contents of an
lbaint_tvariable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness.Signed-off-by Tom Rini <[email protected]>
Quoted 32 lines
---
Cc: Mattijs Korpershoek <[email protected]>
Cc: Igor Opaniuk <[email protected]>
Cc: Sam Protsenko <[email protected]>--- common/avb_verify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)common/avb_verify.c +2
-2@@ -320,7 +320,7 @@ static unsigned long mmc_read_and_flush(struct mmc_part *part, }if ((start + sectors) > (part->info.start + part->info.size)) { sectors = part->info.start + part->info.size - start; -printf ("%s: read sector aligned to partition bounds (%ld)\n" , +printf ("%s: read sector aligned to partition bounds (" LBAF ")\n" , __func__, sectors); }@@ -363,7 +363,7 @@ static unsigned long mmc_write(struct mmc_part *part, lbaint_t start, }if ((start + sectors) > (part->info.start + part->info.size)) { sectors = part->info.start + part->info.size - start; -printf ("%s: sector aligned to partition bounds (%ld)\n" , +printf ("%s: sector aligned to partition bounds (" LBAF ")\n" , __func__, sectors); }if (unaligned) {Signature · 1 line
2.43.0
Re: [PATCH 2/2] common/avb_verify.c: Make use of LBAF for printing lbaint_t
In reply to Tom RiniQuoted 11 lines · Tom Rini
When printing the contents of an
lbaint_tvariable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness.Signed-off-by Tom Rini <[email protected]>---
Cc: Mattijs Korpershoek <[email protected]>
Cc: Igor Opaniuk <[email protected]>
Cc: Sam Protsenko <[email protected]>
---
Quoted 28 lines
common/avb_verify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)common/avb_verify.c +2
-3@@ -320,7 +320,7 @@ static unsigned long mmc_read_and_flush(struct mmc_part *part, }if ((start + sectors) > (part->info.start + part->info.size)) { sectors = part->info.start + part->info.size - start; -printf ("%s: read sector aligned to partition bounds (%ld)\n" , +printf ("%s: read sector aligned to partition bounds (" LBAF ")\n" , __func__, sectors); }@@ -363,7 +363,7 @@ static unsigned long mmc_write(struct mmc_part *part, lbaint_t start, }if ((start + sectors) > (part->info.start + part->info.size)) { sectors = part->info.start + part->info.size - start; -printf ("%s: sector aligned to partition bounds (%ld)\n" , +printf ("%s: sector aligned to partition bounds (" LBAF ")\n" , __func__, sectors); }if (unaligned) { --2.43.0
Hi Tom,
Thank you for the patch.
Quoted 6 lines · Tom Rini
When printing the contents of an
lbaint_tvariable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness. Furthermore, printed message should not be split as that makes finding them harder, so bring this back to a single line.Signed-off-by Tom Rini <[email protected]>
Quoted 24 lines
---
Cc: Mattijs Korpershoek <[email protected]>
Cc: Igor Opaniuk <[email protected]>
Cc: Sam Protsenko <[email protected]>--- boot/android_ab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)boot/android_ab.c +1
-2@@ -101,8 +101,7 @@ static int ab_control_create_from_disk(struct blk_desc *dev_desc, abc_blocks =DIV_ROUND_UP (sizeof (struct bootloader_control ), part_info->blksz);if (abc_offset + abc_blocks > part_info->size) { -log_err ("ANDROID: boot control partition too small. Need at" ); -log_err (" least %lu blocks but have %lu blocks.\n" , +log_err ("ANDROID: boot control partition too small. Need at least %lu blocks but have " LBAF " blocks.\n" , abc_offset + abc_blocks, part_info->size);return -EINVAL ; }Signature · 1 line
2.43.0
Quoted 6 lines · Tom Rini
When printing the contents of an
lbaint_tvariable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness. Furthermore, printed message should not be split as that makes finding them harder, so bring this back to a single line.
Quoted 6 lines
Signed-off-by Tom Rini <[email protected]>---
Cc: Mattijs Korpershoek <[email protected]>
Cc: Igor Opaniuk <[email protected]>
Cc: Sam Protsenko <[email protected]>
---
Quoted 20 lines
boot/android_ab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)boot/android_ab.c +1
-3@@ -101,8 +101,7 @@ static int ab_control_create_from_disk(struct blk_desc *dev_desc, abc_blocks =DIV_ROUND_UP (sizeof (struct bootloader_control ), part_info->blksz);if (abc_offset + abc_blocks > part_info->size) { -log_err ("ANDROID: boot control partition too small. Need at" ); -log_err (" least %lu blocks but have %lu blocks.\n" , +log_err ("ANDROID: boot control partition too small. Need at least %lu blocks but have " LBAF " blocks.\n" , abc_offset + abc_blocks, part_info->size);return -EINVAL ; } --2.43.0
Hi,
Quoted 6 lines · Tom Rini
When printing the contents of an
lbaint_tvariable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness. Furthermore, printed message should not be split as that makes finding them harder, so bring this back to a single line.
Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)
[1/2] boot/android_ab.c: Make use of LBAF for printing lbaint_t
https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/ab0d5fe4cba420467689be9cbf4ddccabc54cfa8 [2/2] common/avb_verify.c: Make use of LBAF for printing lbaint_t https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/34272133d9e5a46fde6c7f87e452e4b5e51c2999
--
Mattijs