drivers/video/fbdev/atafb.c:2457:17: sparse: sparse: cast removes address space '__iomem' of expression
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 5fc5768c7ca92895ccd1de94dc521e5a55ae7896 commit: d463633d63e6aa10384683bf39971a4b00780c56 fbdev: atafb: Add support for SuperVidel's SuperBlitter date: 5 weeks ago config: m68k-randconfig-r1308-20260926 (https://download.01.org/0day-ci/archive/20260926/[email protected]/config) compiler: m68k-linux-gcc (GCC) 16.1.0 sparse: v0.6.5-rc1 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260926/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Fixes: d463633d63e6 ("fbdev: atafb: Add support for SuperVidel's SuperBlitter")
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/sparse warnings: (new ones prefixed by >>)
drivers/video/fbdev/atafb.c:2824:9: sparse: sparse: switch with no cases drivers/video/fbdev/atafb.c:1092:34: sparse: sparse: Using plain integer as NULL pointer
>> drivers/video/fbdev/atafb.c:2457:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/atafb.c:2641:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef] __iomem *screen_base @@ got void * @@
drivers/video/fbdev/atafb.c:2641:27: sparse: expected char [noderef] __iomem *screen_base
drivers/video/fbdev/atafb.c:2641:27: sparse: got void *
drivers/video/fbdev/atafb.c:2815:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *dst @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/atafb.c:2815:32: sparse: expected void *dst
drivers/video/fbdev/atafb.c:2815:32: sparse: got char [noderef] __iomem *screen_base
drivers/video/fbdev/atafb.c:3353:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *static [toplevel] external_screen_base @@ got void [noderef] __iomem * @@
drivers/video/fbdev/atafb.c:3353:38: sparse: expected void *static [toplevel] external_screen_base
drivers/video/fbdev/atafb.c:3353:38: sparse: got void [noderef] __iomem *
drivers/video/fbdev/atafb.c:3424:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *static [toplevel] external_screen_base @@
drivers/video/fbdev/atafb.c:3424:33: sparse: expected void [noderef] __iomem *addr
drivers/video/fbdev/atafb.c:3424:33: sparse: got void *static [toplevel] external_screen_base
drivers/video/fbdev/atafb.c:3428:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void * @@
drivers/video/fbdev/atafb.c:3428:34: sparse: expected void [noderef] __iomem *addr
drivers/video/fbdev/atafb.c:3428:34: sparse: got void *
vim +/__iomem +2457 drivers/video/fbdev/atafb.c
2436
2437 static void svblit_fillrect(struct fb_info *info,
2438 const struct fb_fillrect *rect)
2439 {
2440 u32 bytespp = info->var.bits_per_pixel / 8;
2441 u32 pitch = info->fix.line_length;
2442 u8 *line;
2443 u32 pix;
2444
2445 svblit_wait(); /* the CPU is about to touch the fb */
2446
2447 if (rect->rop != ROP_COPY || rect->height <= 1 ||
2448 rect->height > 4096) {
2449 cfb_fillrect(info, rect);
2450 return;
2451 }
2452
2453 pix = (info->fix.visual == FB_VISUAL_TRUECOLOR) ?
2454 ((u32 *)info->pseudo_palette)[rect->color] : rect->color;
2455
2456 /* draw the first line with the CPU ... */
> 2457 line = (u8 *)info->screen_base + rect->dy * pitch +
2458 rect->dx * bytespp;
2459 switch (bytespp) {
2460 case 1:
2461 memset(line, pix, rect->width);
2462 break;
2463 case 2:
2464 memset16((u16 *)line, pix, rect->width);
2465 break;
2466 default:
2467 memset32((u32 *)line, pix, rect->width);
2468 break;
2469 }
2470
2471 /* ... and let the blitter replicate it into the other lines */
2472 svblit_copy(external_addr + rect->dy * pitch + rect->dx * bytespp,
2473 external_addr + (rect->dy + 1) * pitch +
2474 rect->dx * bytespp,
2475 rect->width * bytespp, 0, pitch, rect->height - 1); 2476 }
2477
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Helge,
if I read this correctly, your patch fixed the two other warnings (the dead atafb_ioctl and pclock = 0). Since you mentioned "Fixes:d463633d63e6" pointing at my commit, maybe you can take a look at the line 2457, too? I'm too unfamiliar with the whole process but since I got the warning email, I just wanted to point your attention to it.
Thanks,
Miro
Quoted 84 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 5fc5768c7ca92895ccd1de94dc521e5a55ae7896 commit: d463633d63e6aa10384683bf39971a4b00780c56 fbdev: atafb: Add support for SuperVidel's SuperBlitter date: 5 weeks ago config: m68k-randconfig-r1308-20260926 (https://download.01.org/0day-ci/archive/20260926/[email protected]/config) compiler: m68k-linux-gcc (GCC) 16.1.0 sparse: v0.6.5-rc1 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260926/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Fixes: d463633d63e6 ("fbdev: atafb: Add support for SuperVidel's SuperBlitter") | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/sparse warnings: (new ones prefixed by >>)
drivers/video/fbdev/atafb.c:2824:9: sparse: sparse: switch with no casesdrivers/video/fbdev/atafb.c:1092:34: sparse: sparse: Using plain integer as NULL pointerQuoted 1 line
Quoted 1 line
drivers/video/fbdev/atafb.c:2457:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/atafb.c:2641:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef]__iomem*screen_base@@ got void * @@
drivers/video/fbdev/atafb.c:2641:27: sparse: expected char [noderef]__iomem*screen_base
drivers/video/fbdev/atafb.c:2641:27: sparse: got void *
drivers/video/fbdev/atafb.c:2815:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *dst @@ got char [noderef]__iomem*screen_base@@
drivers/video/fbdev/atafb.c:2815:32: sparse: expected void *dst
drivers/video/fbdev/atafb.c:2815:32: sparse: got char [noderef]__iomem*screen_base
drivers/video/fbdev/atafb.c:3353:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *static [toplevel]external_screen_base@@ got void [noderef]__iomem* @@
drivers/video/fbdev/atafb.c:3353:38: sparse: expected void *static [toplevel]external_screen_base
drivers/video/fbdev/atafb.c:3353:38: sparse: got void [noderef]__iomem*
drivers/video/fbdev/atafb.c:3424:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef]__iomem*addr @@ got void *static [toplevel]external_screen_base@@
drivers/video/fbdev/atafb.c:3424:33: sparse: expected void [noderef]__iomem*addr
drivers/video/fbdev/atafb.c:3424:33: sparse: got void *static [toplevel]external_screen_base
drivers/video/fbdev/atafb.c:3428:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef]__iomem*addr @@ got void * @@
drivers/video/fbdev/atafb.c:3428:34: sparse: expected void [noderef]__iomem*addr
drivers/video/fbdev/atafb.c:3428:34: sparse: got void *vim +/__iomem +2457
drivers/video/fbdev/atafb.c2436
2437 static void svblit_fillrect(structfb_info*info,
2438 const structfb_fillrect*rect)
2439 {2440 u32 bytespp = info->var.bits_per_pixel / 8; 2441 u32 pitch = info->fix.line_length; 2442 u8 *line; 2443 u32 pix;2444
2445svblit_wait(); /* the CPU is about to touch the fb */
2446
2447 if (rect->rop!=ROP_COPY||rect->height<= 1 ||
2448rect->height> 4096) {
2449cfb_fillrect(info, rect);
2450 return;
2451 }
2452
2453 pix = (info->fix.visual==FB_VISUAL_TRUECOLOR) ?
2454 ((u32 *)info->pseudo_palette)[rect->color] :rect->color;
2455
2456 /* draw the first line with the CPU ... */Quoted 1 line
2457 line = (u8 *)info->screen_base +
rect->dy* pitch +2458
rect->dx* bytespp;
2459 switch (bytespp) {
2460 case 1:
2461memset(line, pix, rect->width);
2462 break;
2463 case 2:
2464memset16((u16 *)line, pix, rect->width);
2465 break;
2466 default:
2467memset32((u32 *)line, pix, rect->width);
2468 break;
2469 }
2470
2471 /* ... and let the blitter replicate it into the other lines */
2472 svblit_copy(external_addr +rect->dy* pitch +rect->dx* bytespp,2473 external_addr + (rect->dy + 1) * pitch + 2474 rect->dx * bytespp, 2475 rect->width * bytespp, 0, pitch, rect->height - 1);2476 }
2477--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Signature · 1 line
http://mikro.atari.org
Quoted 7 lines · Miro Kropáček
Helge,
if I read this correctly, your patch fixed the two other warnings (the dead
atafb_ioctland pclock = 0). Since you mentioned "Fixes:d463633d63e6" pointing at my commit, maybe you can take a look at the line 2457, too? I'm too unfamiliar with the whole process but since I got the warning email, I just wanted to point your attention to it.
I just send a patch to fix this to the mailing lists and added it into my for-next tree. You may respond to the patch with an Acked-by or Reviewed-by tag if you like.
Thanks!
Helge
Quoted 91 lines
Thanks,
MiroQuoted 84 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 5fc5768c7ca92895ccd1de94dc521e5a55ae7896 commit: d463633d63e6aa10384683bf39971a4b00780c56 fbdev: atafb: Add support for SuperVidel's SuperBlitter date: 5 weeks ago config: m68k-randconfig-r1308-20260926 (https://download.01.org/0day-ci/archive/20260926/[email protected]/config) compiler: m68k-linux-gcc (GCC) 16.1.0 sparse: v0.6.5-rc1 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260926/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Fixes: d463633d63e6 ("fbdev: atafb: Add support for SuperVidel's SuperBlitter") | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/sparse warnings: (new ones prefixed by >>)
drivers/video/fbdev/atafb.c:2824:9: sparse: sparse: switch with no casesdrivers/video/fbdev/atafb.c:1092:34: sparse: sparse: Using plain integer as NULL pointerQuoted 1 line
Quoted 1 line
drivers/video/fbdev/atafb.c:2457:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/atafb.c:2641:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef]__iomem*screen_base@@ got void * @@
drivers/video/fbdev/atafb.c:2641:27: sparse: expected char [noderef]__iomem*screen_base
drivers/video/fbdev/atafb.c:2641:27: sparse: got void *
drivers/video/fbdev/atafb.c:2815:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *dst @@ got char [noderef]__iomem*screen_base@@
drivers/video/fbdev/atafb.c:2815:32: sparse: expected void *dst
drivers/video/fbdev/atafb.c:2815:32: sparse: got char [noderef]__iomem*screen_base
drivers/video/fbdev/atafb.c:3353:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *static [toplevel]external_screen_base@@ got void [noderef]__iomem* @@
drivers/video/fbdev/atafb.c:3353:38: sparse: expected void *static [toplevel]external_screen_base
drivers/video/fbdev/atafb.c:3353:38: sparse: got void [noderef]__iomem*
drivers/video/fbdev/atafb.c:3424:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef]__iomem*addr @@ got void *static [toplevel]external_screen_base@@
drivers/video/fbdev/atafb.c:3424:33: sparse: expected void [noderef]__iomem*addr
drivers/video/fbdev/atafb.c:3424:33: sparse: got void *static [toplevel]external_screen_base
drivers/video/fbdev/atafb.c:3428:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef]__iomem*addr @@ got void * @@
drivers/video/fbdev/atafb.c:3428:34: sparse: expected void [noderef]__iomem*addr
drivers/video/fbdev/atafb.c:3428:34: sparse: got void *vim +/__iomem +2457
drivers/video/fbdev/atafb.c2436 2437 static void svblit_fillrect(struct fb_info *info, 2438 const struct fb_fillrect *rect) 2439 { 2440 u32 bytespp = info->var.bits_per_pixel / 8; 2441 u32 pitch = info->fix.line_length; 2442 u8 *line; 2443 u32 pix; 2444 2445 svblit_wait(); /* the CPU is about to touch the fb */ 2446 2447 if (rect->rop != ROP_COPY || rect->height <= 1 || 2448 rect->height > 4096) { 2449 cfb_fillrect(info, rect); 2450 return; 2451 } 2452 2453 pix = (info->fix.visual == FB_VISUAL_TRUECOLOR) ? 2454 ((u32 *)info->pseudo_palette)[rect->color] : rect->color; 2455 2456 /* draw the first line with the CPU ... */Quoted 1 line
2457 line = (u8 *)info->screen_base +
rect->dy* pitch +2458 rect->dx * bytespp; 2459 switch (bytespp) { 2460 case 1: 2461 memset(line, pix, rect->width); 2462 break; 2463 case 2: 2464 memset16((u16 *)line, pix, rect->width); 2465 break; 2466 default: 2467 memset32((u32 *)line, pix, rect->width); 2468 break; 2469 } 2470 2471 /* ... and let the blitter replicate it into the other lines */ 2472 svblit_copy(external_addr + rect->dy * pitch + rect->dx * bytespp, 2473 external_addr + (rect->dy + 1) * pitch + 2474 rect->dx * bytespp, 2475 rect->width * bytespp, 0, pitch, rect->height - 1); 2476 } 2477--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki