All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: replace number with sizeof()
@ 2026-09-14  9:08 Manuel Ebner
  2026-09-14  9:16 ` sashiko-bot
  2026-09-14 10:57 ` Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Manuel Ebner @ 2026-09-14  9:08 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman
  Cc: Manuel Ebner, dri-devel, linux-fbdev, linux-staging, linux-kernel

Replace integer number with sizeof with the goal of prevent future truncation bugs.

Signed-off-by: Manuel Ebner <manuelebnerli@mailbox.org>
---
 drivers/staging/fbtft/fb_ili9320.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
index 0f98267a7..655778392 100644
--- a/drivers/staging/fbtft/fb_ili9320.c
+++ b/drivers/staging/fbtft/fb_ili9320.c
@@ -21,7 +21,7 @@
 
 static unsigned int read_devicecode(struct fbtft_par *par)
 {
-	u8 rxbuf[8] = {0, };
+	u8 rxbuf[sizeof(u64)] = {0, };
 
 	write_reg(par, 0x0000);
 	par->fbtftops.read(par, rxbuf, 4);
-- 
2.55.0


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

end of thread, other threads:[~2026-09-14 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14  9:08 [PATCH] staging: fbtft: replace number with sizeof() Manuel Ebner
2026-09-14  9:16 ` sashiko-bot
2026-09-14 10:57 ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.