* [PATCH] staging: greybus: bootrom: use firmware size for debug output
@ 2026-11-24 18:10 pavankumaryalagada
2026-11-24 18:20 ` Alex Elder
0 siblings, 1 reply; 2+ messages in thread
From: pavankumaryalagada @ 2026-11-24 18:10 UTC (permalink / raw)
To: johan
Cc: gregkh, elder, vireshk, esennesh, skhan, greybus-dev,
linux-staging, linux-kernel, Yalagada Pavan Kumar, Alex Elder
From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
The firmware size is converted to little-endian byte order before
being stored in size_response->size. However, the debug message
prints size_response->size directly without converting it back
to CPU byte order.
Use bootrom->fw->size instead, which already contains the firmware
size in CPU byte order.
Fixes: fc41c2da44c5 ("greybus: firmware/bootrom: debug output from bootrom protocol")
Suggested-by: Alex Elder <elder@riscstar.com>
Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
---
drivers/staging/greybus/bootrom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
index fb1fbd3f7b99..4e225084851b 100644
--- a/drivers/staging/greybus/bootrom.c
+++ b/drivers/staging/greybus/bootrom.c
@@ -222,8 +222,8 @@ static int gb_bootrom_firmware_size_request(struct gb_operation *op)
size_response = op->response->payload;
size_response->size = cpu_to_le32(bootrom->fw->size);
- dev_dbg(dev, "%s: firmware size %u bytes\n",
- __func__, size_response->size);
+ dev_dbg(dev, "%s: firmware size %zu bytes\n",
+ __func__, bootrom->fw->size);
unlock:
mutex_unlock(&bootrom->mutex);
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] staging: greybus: bootrom: use firmware size for debug output
2026-11-24 18:10 [PATCH] staging: greybus: bootrom: use firmware size for debug output pavankumaryalagada
@ 2026-11-24 18:20 ` Alex Elder
0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2026-11-24 18:20 UTC (permalink / raw)
To: pavankumaryalagada, johan
Cc: gregkh, elder, vireshk, esennesh, skhan, greybus-dev,
linux-staging, linux-kernel
On 11/24/26 12:10 PM, pavankumaryalagada@gmail.com wrote:
> From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
>
> The firmware size is converted to little-endian byte order before
> being stored in size_response->size. However, the debug message
> prints size_response->size directly without converting it back
> to CPU byte order.
>
> Use bootrom->fw->size instead, which already contains the firmware
> size in CPU byte order.
>
> Fixes: fc41c2da44c5 ("greybus: firmware/bootrom: debug output from bootrom protocol")
> Suggested-by: Alex Elder <elder@riscstar.com>
> Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
Thanks for the patch, this looks good.
Reviewed-by: Alex Elder <elder@riscstar.com>
> ---
> drivers/staging/greybus/bootrom.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
> index fb1fbd3f7b99..4e225084851b 100644
> --- a/drivers/staging/greybus/bootrom.c
> +++ b/drivers/staging/greybus/bootrom.c
> @@ -222,8 +222,8 @@ static int gb_bootrom_firmware_size_request(struct gb_operation *op)
> size_response = op->response->payload;
> size_response->size = cpu_to_le32(bootrom->fw->size);
>
> - dev_dbg(dev, "%s: firmware size %u bytes\n",
> - __func__, size_response->size);
> + dev_dbg(dev, "%s: firmware size %zu bytes\n",
> + __func__, bootrom->fw->size);
>
> unlock:
> mutex_unlock(&bootrom->mutex);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-24 18:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 18:10 [PATCH] staging: greybus: bootrom: use firmware size for debug output pavankumaryalagada
2026-11-24 18:20 ` Alex Elder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®