From: Helge Deller <deller@gmx.de>
To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Cc: kernel test robot <lkp@intel.com>,
Miro Kropacek <miro.kropacek@gmail.com>
Subject: [PATCH] fbdev: atafb: fix sparse warnings
Date: Sat, 26 Sep 2026 08:20:08 +0200 [thread overview]
Message-ID: <20260926062136.162108-1-deller@gmx.de> (raw)
Fix two sparse warnings:
- atafb.c:1092: sparse: Using plain integer as NULL pointer
Use NULL instead of 0 when assigning a pointer.
- atafb.c:2824: sparse: switch with no cases
FBCMD_GET_CURRENTPAR and and FBCMD_SET_CURRENTPAR seem to be
historic defines, which are not any longer in the kernel, and
as such the code isn't built any longer and may be dropped.
Fixes: d463633d63e6 ("fbdev: atafb: Add support for SuperVidel's SuperBlitter")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609261313.kgFtkz2t-lkp@intel.com/
Cc: Miro Kropacek <miro.kropacek@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
---
drivers/video/fbdev/atafb.c | 26 +-------------------------
1 file changed, 1 insertion(+), 25 deletions(-)
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index c3011b61a94b..5c3e5861543a 100644
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -1089,7 +1089,7 @@ static int falcon_decode_var(struct fb_info *info, struct fb_var_screeninfo *var
/* Choose largest pixelclock <= wanted clock */
int i;
unsigned long pcl = ULONG_MAX;
- pclock = 0;
+ pclock = NULL;
for (i = 1; i <= 4; i *= 2) {
if (f25.t * i >= var->pixclock &&
f25.t * i < pcl) {
@@ -2818,29 +2818,6 @@ static void atafb_imageblit(struct fb_info *info, const struct fb_image *image)
}
}
-static int
-atafb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
-{
- switch (cmd) {
-#ifdef FBCMD_GET_CURRENTPAR
- case FBCMD_GET_CURRENTPAR:
- if (copy_to_user((void *)arg, ¤t_par,
- sizeof(struct atafb_par)))
- return -EFAULT;
- return 0;
-#endif
-#ifdef FBCMD_SET_CURRENTPAR
- case FBCMD_SET_CURRENTPAR:
- if (copy_from_user(¤t_par, (void *)arg,
- sizeof(struct atafb_par)))
- return -EFAULT;
- ata_set_par(¤t_par);
- return 0;
-#endif
- }
- return -EINVAL;
-}
-
/* (un)blank/poweroff
* 0 = unblank
* 1 = blank
@@ -2922,7 +2899,6 @@ static struct fb_ops atafb_ops = {
.fb_fillrect = atafb_fillrect,
.fb_copyarea = atafb_copyarea,
.fb_imageblit = atafb_imageblit,
- .fb_ioctl = atafb_ioctl,
__FB_DEFAULT_IOMEM_OPS_MMAP,
};
--
2.55.0
next reply other threads:[~2026-09-26 6:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 6:20 Helge Deller [this message]
2026-09-27 13:36 ` [PATCH] fbdev: atafb: fix sparse warnings Geert Uytterhoeven
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=20260926062136.162108-1-deller@gmx.de \
--to=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=lkp@intel.com \
--cc=miro.kropacek@gmail.com \
/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