Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH v2] staging: greybus: bootrom: fix firmware size endianness in debug log
@ 2026-12-04 18:25 Omar Yiğitcan Mengü
  0 siblings, 0 replies; only message in thread
From: Omar Yiğitcan Mengü @ 2026-12-04 18:25 UTC (permalink / raw)
  To: Viresh Kumar, Johan Hovold, Alex Elder, Greg Kroah-Hartman
  Cc: Dan Carpenter, greybus-dev, linux-staging,
	Omar Yiğitcan Mengü

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>
---

Changes in v2:
- Resend using git send-email to avoid line wrapping.

 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] only message in thread

only message in thread, other threads:[~2026-12-04 18:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 18:25 [PATCH v2] staging: greybus: bootrom: fix firmware size endianness in debug log Omar Yiğitcan Mengü

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