From: Manuel Ebner <manuelebnerli@mailbox.org>
To: Andy Shevchenko <andy@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Manuel Ebner <manuelebnerli@mailbox.org>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: fbtft: replace number with sizeof()
Date: Mon, 14 Sep 2026 11:08:58 +0200 [thread overview]
Message-ID: <20260914090858.9939-2-manuelebnerli@mailbox.org> (raw)
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
next reply other threads:[~2026-09-14 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 9:08 Manuel Ebner [this message]
2026-09-14 10:57 ` [PATCH] staging: fbtft: replace number with sizeof() Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260914090858.9939-2-manuelebnerli@mailbox.org \
--to=manuelebnerli@mailbox.org \
--cc=andy@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox