Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: bootrom: fix firmware size endianness in debug log
@ 2026-12-04 17:08 Omar Yiğitcan Mengü
  2026-12-04 18:09 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Omar Yiğitcan Mengü @ 2026-12-04 17:08 UTC (permalink / raw)
  To: vireshk, johan, elder, gregkh; +Cc: greybus-dev, linux-staging

In gb_bootrom_firmware_size_request(), size_response->size is a __le32
field populated with cpu_to_le32(bootrom->fw->size). Printing
size_response->size directly with %u outputs a byte-swapped value on
big-endian hosts.

Print bootrom->fw->size directly with %zu instead so the logged size is
always in host byte order.

Signed-off-by: Omar Yiğitcan Mengü <menguomary@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 fb1fbd3f7b9..4e225084851 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.53.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: greybus: bootrom: fix firmware size endianness in debug log
  2026-12-04 17:08 [PATCH] staging: greybus: bootrom: fix firmware size endianness in debug log Omar Yiğitcan Mengü
@ 2026-12-04 18:09 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-12-04 18:09 UTC (permalink / raw)
  To: Omar Yiğitcan Mengü
  Cc: vireshk, johan, elder, gregkh, greybus-dev, linux-staging

On Fri, Dec 04, 2026 at 05:08:08PM +0000, Omar Yiğitcan Mengü wrote:
> In gb_bootrom_firmware_size_request(), size_response->size is a __le32
> field populated with cpu_to_le32(bootrom->fw->size). Printing
> size_response->size directly with %u outputs a byte-swapped value on
> big-endian hosts.
> 
> Print bootrom->fw->size directly with %zu instead so the logged size is
> always in host byte order.
> 
> Signed-off-by: Omar Yiğitcan Mengü <menguomary@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 fb1fbd3f7b9..4e225084851 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)

The patch is corrupt.  Read the first paragraph of
Documentation/process/email-clients.rst  Otherwise the patch itself
seems reasonable enough.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-04 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 17:08 [PATCH] staging: greybus: bootrom: fix firmware size endianness in debug log Omar Yiğitcan Mengü
2026-12-04 18:09 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox