From: sashiko-bot@kernel.org
To: "Helge Deller" <deller@gmx.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] atafb: avoid cast when assigning buffer address pointer
Date: Tue, 29 Sep 2026 06:20:42 +0000 [thread overview]
Message-ID: <20260929062042.C640B1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260929061223.55435-1-deller@gmx.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] fbdev: incorrect sparse warning suppression via union alias
--
commit d3053bb9def82e951de5b1b68d5beb85bd502468
Author: Helge Deller <deller@gmx.de>
atafb: avoid cast when assigning buffer address pointer
This commit attempts to resolve a sparse warning about an __iomem address
space cast by switching to the screen_buffer alias from the fb_info union.
Closes: https://lore.kernel.org/oe-kbuild-all/202609261313.kgFtkz2t-lkp@intel.com/
> diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
> index 5c3e5861543a2..c32576cb17202 100644
> --- a/drivers/video/fbdev/atafb.c
> +++ b/drivers/video/fbdev/atafb.c
> @@ -2454,7 +2454,7 @@ static void svblit_fillrect(struct fb_info *info,
> ((u32 *)info->pseudo_palette)[rect->color] : rect->color;
>
> /* draw the first line with the CPU ... */
> - line = (u8 *)info->screen_base + rect->dy * pitch +
> + line = info->screen_buffer + rect->dy * pitch +
> rect->dx * bytespp;
[Severity: Low]
This isn't a runtime bug, but does this improperly suppress the sparse warning
by type-punning through the union alias?
By switching to screen_buffer in svblit_fillrect(), the code bypasses the
__iomem static analysis checks without making the memory access structurally
correct.
Shouldn't this use an explicit (__force) cast or proper I/O accessors rather
than hiding the access through a non-__iomem union member?
> switch (bytespp) {
> case 1:
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260929061223.55435-1-deller@gmx.de?part=1
prev parent reply other threads:[~2026-09-29 6:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 6:12 [PATCH] atafb: avoid cast when assigning buffer address pointer Helge Deller
2026-09-29 6:20 ` sashiko-bot [this message]
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=20260929062042.C640B1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@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 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.