All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
@ 2026-03-04 14:03 kernel test robot
  2026-03-04 18:23 ` Helge Deller
  0 siblings, 1 reply; 8+ messages in thread
From: kernel test robot @ 2026-03-04 14:03 UTC (permalink / raw)
  To: Uwe Kleine-König ; +Cc: oe-kbuild-all, linux-kernel, Helge Deller

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0031c06807cfa8aa51a759ff8aa09e1aa48149af
commit: 6f366e86481a7503a821de82930df517dddd4047 fbdev: au1100fb: Make driver compilable on non-mips platforms
date:   13 days ago
config: mips-randconfig-r052-20260304 (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/config)
compiler: mips64-linux-gcc (GCC) 14.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   drivers/video/fbdev/au1100fb.c: In function 'au1100fb_drv_probe':
>> drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Wimplicit-function-declaration]
     448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
         |                                              ^~~~~~~~~
         |                                              CKSEG1ADDR
>> drivers/video/fbdev/au1100fb.c:448:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
         |                       ^


vim +448 drivers/video/fbdev/au1100fb.c

^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  404  
48c68c4f1b5424 drivers/video/au1100fb.c       Greg Kroah-Hartman 2012-12-21  405  static int au1100fb_drv_probe(struct platform_device *dev)
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  406  {
46953e6aab262d drivers/video/fbdev/au1100fb.c Markus Elfring     2018-03-28  407  	struct au1100fb_device *fbdev;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  408  	struct resource *regs_res;
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  409  	struct clk *c;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  410  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  411  	/* Allocate new device private */
db66f0252e2f17 drivers/video/fbdev/au1100fb.c Markus Elfring     2018-03-28  412  	fbdev = devm_kzalloc(&dev->dev, sizeof(*fbdev), GFP_KERNEL);
29914badc59b23 drivers/video/fbdev/au1100fb.c Markus Elfring     2018-03-28  413  	if (!fbdev)
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  414  		return -ENOMEM;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  415  
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  416  	if (au1100fb_setup(fbdev))
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  417  		goto failed;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  418  
7a192ec334cab9 drivers/video/au1100fb.c       Ming Lei           2009-02-06  419  	platform_set_drvdata(dev, (void *)fbdev);
67f30ad19c4b32 drivers/video/fbdev/au1100fb.c Christoph Hellwig  2019-04-28  420  	fbdev->dev = &dev->dev;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  421  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  422  	/* Allocate region for our registers and map them */
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  423  	regs_res = platform_get_resource(dev, IORESOURCE_MEM, 0);
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  424  	if (!regs_res) {
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  425  		print_err("fail to retrieve registers resource");
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  426  		return -EFAULT;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  427  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  428  
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  429  	fbdev->info.fix = (struct fb_fix_screeninfo) {
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  430  		.mmio_start = regs_res->start,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  431  		.mmio_len = resource_size(regs_res),
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  432  		.id = "AU1100 FB",
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  433  		.xpanstep = 1,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  434  		.ypanstep = 1,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  435  		.type = FB_TYPE_PACKED_PIXELS,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  436  		.accel = FB_ACCEL_NONE,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  437  	};
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  438  
93019734555f8d drivers/video/au1100fb.c       Manuel Lauss       2012-03-24  439  	if (!devm_request_mem_region(&dev->dev,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  440  				     fbdev->info.fix.mmio_start,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  441  				     fbdev->info.fix.mmio_len,
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  442  				     DRIVER_NAME)) {
c05b7f3d12b945 drivers/video/au1100fb.c       Rodolfo Giometti   2006-05-30  443  		print_err("fail to lock memory region at 0x%08lx",
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  444  			  fbdev->info.fix.mmio_start);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  445  		return -EBUSY;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  446  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  447  
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16 @448  	fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  449  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  450  	print_dbg("Register memory map at %p", fbdev->regs);
13c89a37c6f6f3 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  451  	print_dbg("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  452  
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  453  	c = clk_get(NULL, "lcd_intclk");
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  454  	if (!IS_ERR(c)) {
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  455  		fbdev->lcdclk = c;
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  456  		clk_set_rate(c, 48000000);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  457  		clk_prepare_enable(c);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  458  	}
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  459  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  460  	/* Allocate the framebuffer to the maximum screen size * nbr of video buffers */
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  461  	fbdev->fb_len = fbdev->panel->xres * fbdev->panel->yres *
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  462  		  	(fbdev->panel->bpp >> 3) * AU1100FB_NBR_VIDEO_BUFFERS;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  463  
93019734555f8d drivers/video/au1100fb.c       Manuel Lauss       2012-03-24  464  	fbdev->fb_mem = dmam_alloc_coherent(&dev->dev,
1c16697bf9d5b2 drivers/video/au1100fb.c       Julia Lawall       2012-01-21  465  					    PAGE_ALIGN(fbdev->fb_len),
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  466  					    &fbdev->fb_phys, GFP_KERNEL);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  467  	if (!fbdev->fb_mem) {
13c89a37c6f6f3 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  468  		print_err("fail to allocate framebuffer (size: %zuK))",
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  469  			  fbdev->fb_len / 1024);
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  470  		return -ENOMEM;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  471  	}
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  472  
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  473  	fbdev->info.fix.smem_start = fbdev->fb_phys;
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  474  	fbdev->info.fix.smem_len = fbdev->fb_len;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  475  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  476  	print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
13c89a37c6f6f3 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  477  	print_dbg("phys=0x%pad, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  478  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  479  	/* load the panel info into the var struct */
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  480  	fbdev->info.var = (struct fb_var_screeninfo) {
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  481  		.activate = FB_ACTIVATE_NOW,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  482  		.height = -1,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  483  		.width = -1,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  484  		.vmode = FB_VMODE_NONINTERLACED,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  485  		.bits_per_pixel = fbdev->panel->bpp,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  486  		.xres = fbdev->panel->xres,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  487  		.xres_virtual = fbdev->panel->xres,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  488  		.yres = fbdev->panel->yres,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  489  		.yres_virtual = fbdev->panel->yres,
7939cecdc6fa39 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-16  490  	};
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  491  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  492  	fbdev->info.screen_base = fbdev->fb_mem;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  493  	fbdev->info.fbops = &au1100fb_ops;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  494  
1c16697bf9d5b2 drivers/video/au1100fb.c       Julia Lawall       2012-01-21  495  	fbdev->info.pseudo_palette =
a86854d0c599b3 drivers/video/fbdev/au1100fb.c Kees Cook          2018-06-12  496  		devm_kcalloc(&dev->dev, 16, sizeof(u32), GFP_KERNEL);
1c16697bf9d5b2 drivers/video/au1100fb.c       Julia Lawall       2012-01-21  497  	if (!fbdev->info.pseudo_palette)
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  498  		return -ENOMEM;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  499  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  500  	if (fb_alloc_cmap(&fbdev->info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  501  		print_err("Fail to allocate colormap (%d entries)",
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  502  			   AU1100_LCD_NBR_PALETTE_ENTRIES);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  503  		return -EFAULT;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  504  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  505  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  506  	/* Set h/w registers */
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  507  	au1100fb_setmode(fbdev);
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  508  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  509  	/* Register new framebuffer */
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  510  	if (register_framebuffer(&fbdev->info) < 0) {
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  511  		print_err("cannot register new framebuffer");
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  512  		goto failed;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  513  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  514  
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  515  	return 0;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  516  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  517  failed:
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  518  	if (fbdev->lcdclk) {
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  519  		clk_disable_unprepare(fbdev->lcdclk);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  520  		clk_put(fbdev->lcdclk);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  521  	}
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  522  	if (fbdev->info.cmap.len != 0) {
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  523  		fb_dealloc_cmap(&fbdev->info.cmap);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  524  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  525  
1c16697bf9d5b2 drivers/video/au1100fb.c       Julia Lawall       2012-01-21  526  	return -ENODEV;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  527  }
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  528  

:::::: The code at line 448 was first introduced by commit
:::::: 7939cecdc6fa39ea9e74507a389f31a7a7936b18 fbdev: au1100fb: Don't store device specific data in global variables

:::::: TO: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
:::::: CC: Helge Deller <deller@gmx.de>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
  2026-03-04 14:03 drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? kernel test robot
@ 2026-03-04 18:23 ` Helge Deller
  2026-03-05  8:07   ` Uwe Kleine-König
  0 siblings, 1 reply; 8+ messages in thread
From: Helge Deller @ 2026-03-04 18:23 UTC (permalink / raw)
  To: kernel test robot, Uwe Kleine-König; +Cc: oe-kbuild-all, linux-kernel

* kernel test robot <lkp@intel.com>:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   0031c06807cfa8aa51a759ff8aa09e1aa48149af
> commit: 6f366e86481a7503a821de82930df517dddd4047 fbdev: au1100fb: Make driver compilable on non-mips platforms
> date:   13 days ago
> config: mips-randconfig-r052-20260304 (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/config)
> compiler: mips64-linux-gcc (GCC) 14.3.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/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
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
> 
> All error/warnings (new ones prefixed by >>):
> 
>    drivers/video/fbdev/au1100fb.c: In function 'au1100fb_drv_probe':
> >> drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Wimplicit-function-declaration]
>      448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
>          |                                              ^~~~~~~~~
>          |                                              CKSEG1ADDR
> >> drivers/video/fbdev/au1100fb.c:448:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>      448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
>          |                       ^

I've pushed the patch below into the fbdev git tree.
It should (hopefully) fix the issue.

Helge


From: Helge Deller <deller@gmx.de>
Subject: [PATCH] fbdev: au1100fb: Fix build on MIPS64

Fix an error reported by the kernel test robot:
 au1100fb.c: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?

The header asm/mach-au1x00/au1000.h is unused apart from pulling in
<linux/delay.h> (for mdelay()) and <linux/io.h> (for KSEG1ADDR()). Then
the only platform specific part in the driver is the usage of the KSEG1ADDR
macro, which for the non-mips case can be stubbed.

Fixes: 6f366e86481a ("fbdev: au1100fb: Make driver compilable on non-mips platforms")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index 1a04154bc535..3b104d377d28 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -380,7 +380,7 @@ static struct au1100fb_panel known_lcd_panels[] =
 #define panel_is_color(panel) (panel->control_base & LCD_CONTROL_PC)
 #define panel_swap_rgb(panel) (panel->control_base & LCD_CONTROL_CCO)
 
-#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
+#if defined(CONFIG_COMPILE_TEST) && !(defined(CONFIG_MIPS) && !defined(CONFIG_64BIT))
 /* This is only defined to be able to compile this driver on non-mips platforms */
 #define KSEG1ADDR(x) (x)
 #endif



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

* Re: drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
  2026-03-04 18:23 ` Helge Deller
@ 2026-03-05  8:07   ` Uwe Kleine-König
  2026-03-05  8:57     ` Helge Deller
  0 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König @ 2026-03-05  8:07 UTC (permalink / raw)
  To: Helge Deller; +Cc: kernel test robot, oe-kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4230 bytes --]

Hello,

On Wed, Mar 04, 2026 at 07:23:30PM +0100, Helge Deller wrote:
> * kernel test robot <lkp@intel.com>:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   0031c06807cfa8aa51a759ff8aa09e1aa48149af
> > commit: 6f366e86481a7503a821de82930df517dddd4047 fbdev: au1100fb: Make driver compilable on non-mips platforms
> > date:   13 days ago
> > config: mips-randconfig-r052-20260304 (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/config)
> > compiler: mips64-linux-gcc (GCC) 14.3.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/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
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
> > 
> > All error/warnings (new ones prefixed by >>):
> > 
> >    drivers/video/fbdev/au1100fb.c: In function 'au1100fb_drv_probe':
> > >> drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Wimplicit-function-declaration]
> >      448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
> >          |                                              ^~~~~~~~~
> >          |                                              CKSEG1ADDR
> > >> drivers/video/fbdev/au1100fb.c:448:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> >      448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
> >          |                       ^
> 
> I've pushed the patch below into the fbdev git tree.
> It should (hopefully) fix the issue.
> 
> Helge
> 
> 
> From: Helge Deller <deller@gmx.de>
> Subject: [PATCH] fbdev: au1100fb: Fix build on MIPS64
> 
> Fix an error reported by the kernel test robot:
>  au1100fb.c: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
> 
> The header asm/mach-au1x00/au1000.h is unused apart from pulling in
> <linux/delay.h> (for mdelay()) and <linux/io.h> (for KSEG1ADDR()). Then
> the only platform specific part in the driver is the usage of the KSEG1ADDR
> macro, which for the non-mips case can be stubbed.

This paragraph is copied from 6f366e86481a and doesn't make sense here.
I'd write something like:

	arch/mips/include/asm/addrspace.h defines KSEG1ADDR only for 32 bit
	configurations. So provide its compile-test stub also for 64bit
	mips builds.
	
> 
> Fixes: 6f366e86481a ("fbdev: au1100fb: Make driver compilable on non-mips platforms")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
> Signed-off-by: Helge Deller <deller@gmx.de>
> Cc: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> 
> diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
> index 1a04154bc535..3b104d377d28 100644
> --- a/drivers/video/fbdev/au1100fb.c
> +++ b/drivers/video/fbdev/au1100fb.c
> @@ -380,7 +380,7 @@ static struct au1100fb_panel known_lcd_panels[] =
>  #define panel_is_color(panel) (panel->control_base & LCD_CONTROL_PC)
>  #define panel_swap_rgb(panel) (panel->control_base & LCD_CONTROL_CCO)
>  
> -#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
> +#if defined(CONFIG_COMPILE_TEST) && !(defined(CONFIG_MIPS) && !defined(CONFIG_64BIT))

The condition is equivalent to

	defined(CONFIG_COMPILE_TEST) && (!defined(CONFIG_MIPS) || defined(CONFIG_64BIT))

which is logically a bit easier, but I'm unsure if it's easier to
understand (IMHO both are bad).

>  /* This is only defined to be able to compile this driver on non-mips platforms */

Maybe adapt the comment here, too? Something like:

	/*
	 * KSEG1ADDR() is defined in arch/mips/include/asm/addrspace.h
	 * for 32 bit configurations. Provide a stub for compile testing
	 * on other platforms.
	 */

>  #define KSEG1ADDR(x) (x)
>  #endif

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
  2026-03-05  8:07   ` Uwe Kleine-König
@ 2026-03-05  8:57     ` Helge Deller
  2026-03-05 16:30       ` Uwe Kleine-König
  2026-03-06  7:57       ` Geert Uytterhoeven
  0 siblings, 2 replies; 8+ messages in thread
From: Helge Deller @ 2026-03-05  8:57 UTC (permalink / raw)
  To: Uwe Kleine-König, Helge Deller
  Cc: kernel test robot, oe-kbuild-all, linux-kernel

Hi Uwe,

On 3/5/26 09:07, Uwe Kleine-König wrote:
> On Wed, Mar 04, 2026 at 07:23:30PM +0100, Helge Deller wrote:
>> * kernel test robot <lkp@intel.com>:
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head:   0031c06807cfa8aa51a759ff8aa09e1aa48149af
>>> commit: 6f366e86481a7503a821de82930df517dddd4047 fbdev: au1100fb: Make driver compilable on non-mips platforms
>>> date:   13 days ago
>>> config: mips-randconfig-r052-20260304 (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/config)
>>> compiler: mips64-linux-gcc (GCC) 14.3.0
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/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
>>> | Reported-by: kernel test robot <lkp@intel.com>
>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
>>>
>>> All error/warnings (new ones prefixed by >>):
>>>
>>>     drivers/video/fbdev/au1100fb.c: In function 'au1100fb_drv_probe':
>>>>> drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Wimplicit-function-declaration]
>>>       448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
>>>           |                                              ^~~~~~~~~
>>>           |                                              CKSEG1ADDR
>>>>> drivers/video/fbdev/au1100fb.c:448:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>>>       448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
>>>           |                       ^
>>
>> I've pushed the patch below into the fbdev git tree.
>> It should (hopefully) fix the issue.
>>
>> Helge
>>
>>
>> From: Helge Deller <deller@gmx.de>
>> Subject: [PATCH] fbdev: au1100fb: Fix build on MIPS64
>>
>> Fix an error reported by the kernel test robot:
>>   au1100fb.c: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
>>
>> The header asm/mach-au1x00/au1000.h is unused apart from pulling in
>> <linux/delay.h> (for mdelay()) and <linux/io.h> (for KSEG1ADDR()). Then
>> the only platform specific part in the driver is the usage of the KSEG1ADDR
>> macro, which for the non-mips case can be stubbed.
> 
> This paragraph is copied from 6f366e86481a and doesn't make sense here.

Yes, I noticed that later and removed it already.

> I'd write something like:
> 
> 	arch/mips/include/asm/addrspace.h defines KSEG1ADDR only for 32 bit
> 	configurations. So provide its compile-test stub also for 64bit
> 	mips builds.

Ok, added.

>> Fixes: 6f366e86481a ("fbdev: au1100fb: Make driver compilable on non-mips platforms")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
>> Signed-off-by: Helge Deller <deller@gmx.de>
>> Cc: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
>>
>> diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
>> index 1a04154bc535..3b104d377d28 100644
>> --- a/drivers/video/fbdev/au1100fb.c
>> +++ b/drivers/video/fbdev/au1100fb.c
>> @@ -380,7 +380,7 @@ static struct au1100fb_panel known_lcd_panels[] =
>>   #define panel_is_color(panel) (panel->control_base & LCD_CONTROL_PC)
>>   #define panel_swap_rgb(panel) (panel->control_base & LCD_CONTROL_CCO)
>>   
>> -#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
>> +#if defined(CONFIG_COMPILE_TEST) && !(defined(CONFIG_MIPS) && !defined(CONFIG_64BIT))
> 
> The condition is equivalent to
> 
> 	defined(CONFIG_COMPILE_TEST) && (!defined(CONFIG_MIPS) || defined(CONFIG_64BIT))
> 
> which is logically a bit easier, but I'm unsure if it's easier to
> understand (IMHO both are bad).

Yes, both are bad. I changed it to your proposal.
  
>>   /* This is only defined to be able to compile this driver on non-mips platforms */
> 
> Maybe adapt the comment here, too? Something like:
> 
> 	/*
> 	 * KSEG1ADDR() is defined in arch/mips/include/asm/addrspace.h
> 	 * for 32 bit configurations. Provide a stub for compile testing
> 	 * on other platforms.
> 	 */

done.

I've updated the patch in the fbdev git tree, which you can find here:
https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/log/?h=for-next

I'll keep the patch a few days in there and will push next week.

Helge

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

* Re: drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
  2026-03-05  8:57     ` Helge Deller
@ 2026-03-05 16:30       ` Uwe Kleine-König
  2026-03-06  7:57       ` Geert Uytterhoeven
  1 sibling, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2026-03-05 16:30 UTC (permalink / raw)
  To: Helge Deller; +Cc: Helge Deller, kernel test robot, oe-kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5383 bytes --]

On Thu, Mar 05, 2026 at 09:57:29AM +0100, Helge Deller wrote:
> Hi Uwe,
> 
> On 3/5/26 09:07, Uwe Kleine-König wrote:
> > On Wed, Mar 04, 2026 at 07:23:30PM +0100, Helge Deller wrote:
> > > * kernel test robot <lkp@intel.com>:
> > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > > head:   0031c06807cfa8aa51a759ff8aa09e1aa48149af
> > > > commit: 6f366e86481a7503a821de82930df517dddd4047 fbdev: au1100fb: Make driver compilable on non-mips platforms
> > > > date:   13 days ago
> > > > config: mips-randconfig-r052-20260304 (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/config)
> > > > compiler: mips64-linux-gcc (GCC) 14.3.0
> > > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/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
> > > > | Reported-by: kernel test robot <lkp@intel.com>
> > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
> > > > 
> > > > All error/warnings (new ones prefixed by >>):
> > > > 
> > > >     drivers/video/fbdev/au1100fb.c: In function 'au1100fb_drv_probe':
> > > > > > drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Wimplicit-function-declaration]
> > > >       448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
> > > >           |                                              ^~~~~~~~~
> > > >           |                                              CKSEG1ADDR
> > > > > > drivers/video/fbdev/au1100fb.c:448:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> > > >       448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
> > > >           |                       ^
> > > 
> > > I've pushed the patch below into the fbdev git tree.
> > > It should (hopefully) fix the issue.
> > > 
> > > Helge
> > > 
> > > 
> > > From: Helge Deller <deller@gmx.de>
> > > Subject: [PATCH] fbdev: au1100fb: Fix build on MIPS64
> > > 
> > > Fix an error reported by the kernel test robot:
> > >   au1100fb.c: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
> > > 
> > > The header asm/mach-au1x00/au1000.h is unused apart from pulling in
> > > <linux/delay.h> (for mdelay()) and <linux/io.h> (for KSEG1ADDR()). Then
> > > the only platform specific part in the driver is the usage of the KSEG1ADDR
> > > macro, which for the non-mips case can be stubbed.
> > 
> > This paragraph is copied from 6f366e86481a and doesn't make sense here.
> 
> Yes, I noticed that later and removed it already.
> 
> > I'd write something like:
> > 
> > 	arch/mips/include/asm/addrspace.h defines KSEG1ADDR only for 32 bit
> > 	configurations. So provide its compile-test stub also for 64bit
> > 	mips builds.
> 
> Ok, added.
> 
> > > Fixes: 6f366e86481a ("fbdev: au1100fb: Make driver compilable on non-mips platforms")
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
> > > Signed-off-by: Helge Deller <deller@gmx.de>
> > > Cc: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> > > 
> > > diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
> > > index 1a04154bc535..3b104d377d28 100644
> > > --- a/drivers/video/fbdev/au1100fb.c
> > > +++ b/drivers/video/fbdev/au1100fb.c
> > > @@ -380,7 +380,7 @@ static struct au1100fb_panel known_lcd_panels[] =
> > >   #define panel_is_color(panel) (panel->control_base & LCD_CONTROL_PC)
> > >   #define panel_swap_rgb(panel) (panel->control_base & LCD_CONTROL_CCO)
> > > -#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
> > > +#if defined(CONFIG_COMPILE_TEST) && !(defined(CONFIG_MIPS) && !defined(CONFIG_64BIT))
> > 
> > The condition is equivalent to
> > 
> > 	defined(CONFIG_COMPILE_TEST) && (!defined(CONFIG_MIPS) || defined(CONFIG_64BIT))
> > 
> > which is logically a bit easier, but I'm unsure if it's easier to
> > understand (IMHO both are bad).
> 
> Yes, both are bad. I changed it to your proposal.
> > >   /* This is only defined to be able to compile this driver on non-mips platforms */
> > 
> > Maybe adapt the comment here, too? Something like:
> > 
> > 	/*
> > 	 * KSEG1ADDR() is defined in arch/mips/include/asm/addrspace.h
> > 	 * for 32 bit configurations. Provide a stub for compile testing
> > 	 * on other platforms.
> > 	 */
> 
> done.
> 
> I've updated the patch in the fbdev git tree, which you can find here:
> https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/log/?h=for-next
> 
> I'll keep the patch a few days in there and will push next week.

https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/commit/?h=for-next&id=93bf32c3d571a9e160306659cef096fe4f79a7f0
looks good to me, feel free to replace the Cc: for my by an

Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

. And let me note that "fbdev: au1100fb: Make driver compilable on
non-mips platforms" is very accurate :-D.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
  2026-03-05  8:57     ` Helge Deller
  2026-03-05 16:30       ` Uwe Kleine-König
@ 2026-03-06  7:57       ` Geert Uytterhoeven
  2026-03-06  8:37         ` Uwe Kleine-König
  1 sibling, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2026-03-06  7:57 UTC (permalink / raw)
  To: Helge Deller
  Cc: Uwe Kleine-König, Helge Deller, kernel test robot,
	oe-kbuild-all, linux-kernel

Hi Helge,

On Thu, 5 Mar 2026 at 09:58, Helge Deller <deller@gmx.de> wrote:
> On 3/5/26 09:07, Uwe Kleine-König wrote:
> > On Wed, Mar 04, 2026 at 07:23:30PM +0100, Helge Deller wrote:
> >> * kernel test robot <lkp@intel.com>:
> >>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >>> head:   0031c06807cfa8aa51a759ff8aa09e1aa48149af
> >>> commit: 6f366e86481a7503a821de82930df517dddd4047 fbdev: au1100fb: Make driver compilable on non-mips platforms
> >>> date:   13 days ago
> >>> config: mips-randconfig-r052-20260304 (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/config)
> >>> compiler: mips64-linux-gcc (GCC) 14.3.0
> >>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260304/202603042127.PT6LuKqi-lkp@intel.com/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
> >>> | Reported-by: kernel test robot <lkp@intel.com>
> >>> | Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
> >>>
> >>> All error/warnings (new ones prefixed by >>):
> >>>
> >>>     drivers/video/fbdev/au1100fb.c: In function 'au1100fb_drv_probe':
> >>>>> drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Wimplicit-function-declaration]
> >>>       448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
> >>>           |                                              ^~~~~~~~~
> >>>           |                                              CKSEG1ADDR
> >>>>> drivers/video/fbdev/au1100fb.c:448:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> >>>       448 |         fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
> >>>           |                       ^
> >>
> >> I've pushed the patch below into the fbdev git tree.
> >> It should (hopefully) fix the issue.
> >>
> >> Helge
> >>
> >>
> >> From: Helge Deller <deller@gmx.de>
> >> Subject: [PATCH] fbdev: au1100fb: Fix build on MIPS64
> >>
> >> Fix an error reported by the kernel test robot:
> >>   au1100fb.c: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
> >>
> >> The header asm/mach-au1x00/au1000.h is unused apart from pulling in
> >> <linux/delay.h> (for mdelay()) and <linux/io.h> (for KSEG1ADDR()). Then
> >> the only platform specific part in the driver is the usage of the KSEG1ADDR
> >> macro, which for the non-mips case can be stubbed.
> >
> > This paragraph is copied from 6f366e86481a and doesn't make sense here.
>
> Yes, I noticed that later and removed it already.
>
> > I'd write something like:
> >
> >       arch/mips/include/asm/addrspace.h defines KSEG1ADDR only for 32 bit
> >       configurations. So provide its compile-test stub also for 64bit
> >       mips builds.
>
> Ok, added.
>
> >> Fixes: 6f366e86481a ("fbdev: au1100fb: Make driver compilable on non-mips platforms")
> >> Reported-by: kernel test robot <lkp@intel.com>
> >> Closes: https://lore.kernel.org/oe-kbuild-all/202603042127.PT6LuKqi-lkp@intel.com/
> >> Signed-off-by: Helge Deller <deller@gmx.de>
> >> Cc: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> >>
> >> diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
> >> index 1a04154bc535..3b104d377d28 100644
> >> --- a/drivers/video/fbdev/au1100fb.c
> >> +++ b/drivers/video/fbdev/au1100fb.c
> >> @@ -380,7 +380,7 @@ static struct au1100fb_panel known_lcd_panels[] =
> >>   #define panel_is_color(panel) (panel->control_base & LCD_CONTROL_PC)
> >>   #define panel_swap_rgb(panel) (panel->control_base & LCD_CONTROL_CCO)
> >>
> >> -#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
> >> +#if defined(CONFIG_COMPILE_TEST) && !(defined(CONFIG_MIPS) && !defined(CONFIG_64BIT))
> >
> > The condition is equivalent to
> >
> >       defined(CONFIG_COMPILE_TEST) && (!defined(CONFIG_MIPS) || defined(CONFIG_64BIT))
> >
> > which is logically a bit easier, but I'm unsure if it's easier to
> > understand (IMHO both are bad).
>
> Yes, both are bad. I changed it to your proposal.

Yes, I had to read it twice, but that applies to both :-(

What about "#ifndef KSEG1ADDR" instead, or would that be considered
too dangerous?  <asm/addrspace.h> is included by MIPS' <asm/io.h>
 so it should always be included if the I/O accessors are available.

---
Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
  2026-03-06  7:57       ` Geert Uytterhoeven
@ 2026-03-06  8:37         ` Uwe Kleine-König
  2026-03-06  8:47           ` Geert Uytterhoeven
  0 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König @ 2026-03-06  8:37 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Helge Deller, Helge Deller, kernel test robot, oe-kbuild-all,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3300 bytes --]

Hello Geert,

On Fri, Mar 06, 2026 at 08:57:27AM +0100, Geert Uytterhoeven wrote:
> On Thu, 5 Mar 2026 at 09:58, Helge Deller <deller@gmx.de> wrote:
> > On 3/5/26 09:07, Uwe Kleine-König wrote:
> > > On Wed, Mar 04, 2026 at 07:23:30PM +0100, Helge Deller wrote:
> > >> -#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
> > >> +#if defined(CONFIG_COMPILE_TEST) && !(defined(CONFIG_MIPS) && !defined(CONFIG_64BIT))
> > >
> > > The condition is equivalent to
> > >
> > >       defined(CONFIG_COMPILE_TEST) && (!defined(CONFIG_MIPS) || defined(CONFIG_64BIT))
> > >
> > > which is logically a bit easier, but I'm unsure if it's easier to
> > > understand (IMHO both are bad).
> >
> > Yes, both are bad. I changed it to your proposal.
> 
> Yes, I had to read it twice, but that applies to both :-(
> 
> What about "#ifndef KSEG1ADDR" instead, or would that be considered
> too dangerous?  <asm/addrspace.h> is included by MIPS' <asm/io.h>
>  so it should always be included if the I/O accessors are available.

Just to state the (maybe?) obvious: With the more complicated expression
it is asserted that the build breaks if on mips32 the definition
disappears e.g. because arch/mips/include/asm/addrspace.h isn't included
implicitly any more or the macro is renamed to unify with mips64's
CKSEG1ADDR. With just `#ifndef KSEG1ADDR` the driver would break without
the compiler noticing and put it's fbdata somewhere in the address
space.

I guess it's subjective, but my preference would be to keep
the more complicated expression (despite being complicated).

An alternative would be:

diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c
index 6984cd5169b5..1958ad0e02a8 100644
--- a/arch/mips/alchemy/devboards/db1000.c
+++ b/arch/mips/alchemy/devboards/db1000.c
@@ -98,8 +98,8 @@ int __init db1500_pci_setup(void)
 
 static struct resource au1100_lcd_resources[] = {
 	[0] = {
-		.start	= AU1100_LCD_PHYS_ADDR,
-		.end	= AU1100_LCD_PHYS_ADDR + 0x800 - 1,
+		.start	= KSEG1ADDR(AU1100_LCD_PHYS_ADDR),
+		.end	= KSEG1ADDR(AU1100_LCD_PHYS_ADDR + 0x800 - 1),
 		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index 1a04154bc535..70b96e9ea454 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -380,11 +380,6 @@ static struct au1100fb_panel known_lcd_panels[] =
 #define panel_is_color(panel) (panel->control_base & LCD_CONTROL_PC)
 #define panel_swap_rgb(panel) (panel->control_base & LCD_CONTROL_CCO)
 
-#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
-/* This is only defined to be able to compile this driver on non-mips platforms */
-#define KSEG1ADDR(x) (x)
-#endif
-
 #define DRIVER_NAME "au1100fb"
 #define DRIVER_DESC "LCD controller driver for AU1100 processors"
 
@@ -764,7 +759,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 		return -EBUSY;
 	}
 
-	fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
+	fbdev->regs = (struct au1100fb_regs*)fbdev->info.fix.mmio_start;
 
 	pr_devel("Register memory map at %p", fbdev->regs);
 	pr_devel("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);


Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
  2026-03-06  8:37         ` Uwe Kleine-König
@ 2026-03-06  8:47           ` Geert Uytterhoeven
  0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2026-03-06  8:47 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Helge Deller, Helge Deller, kernel test robot, oe-kbuild-all,
	linux-kernel

Hi Uwe,

On Fri, 6 Mar 2026 at 09:37, Uwe Kleine-König
<u.kleine-koenig@baylibre.com> wrote:
> On Fri, Mar 06, 2026 at 08:57:27AM +0100, Geert Uytterhoeven wrote:
> > On Thu, 5 Mar 2026 at 09:58, Helge Deller <deller@gmx.de> wrote:
> > > On 3/5/26 09:07, Uwe Kleine-König wrote:
> > > > On Wed, Mar 04, 2026 at 07:23:30PM +0100, Helge Deller wrote:
> > > >> -#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
> > > >> +#if defined(CONFIG_COMPILE_TEST) && !(defined(CONFIG_MIPS) && !defined(CONFIG_64BIT))
> > > >
> > > > The condition is equivalent to
> > > >
> > > >       defined(CONFIG_COMPILE_TEST) && (!defined(CONFIG_MIPS) || defined(CONFIG_64BIT))
> > > >
> > > > which is logically a bit easier, but I'm unsure if it's easier to
> > > > understand (IMHO both are bad).
> > >
> > > Yes, both are bad. I changed it to your proposal.
> >
> > Yes, I had to read it twice, but that applies to both :-(
> >
> > What about "#ifndef KSEG1ADDR" instead, or would that be considered
> > too dangerous?  <asm/addrspace.h> is included by MIPS' <asm/io.h>
> >  so it should always be included if the I/O accessors are available.
>
> Just to state the (maybe?) obvious: With the more complicated expression
> it is asserted that the build breaks if on mips32 the definition
> disappears e.g. because arch/mips/include/asm/addrspace.h isn't included
> implicitly any more or the macro is renamed to unify with mips64's
> CKSEG1ADDR. With just `#ifndef KSEG1ADDR` the driver would break without
> the compiler noticing and put it's fbdata somewhere in the address
> space.

The KSEG1 and CKSEG1 names are part of the MIPS specifications,
so very unlikely to ever change.

> I guess it's subjective, but my preference would be to keep
> the more complicated expression (despite being complicated).
>
> An alternative would be:
>
> diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c
> index 6984cd5169b5..1958ad0e02a8 100644
> --- a/arch/mips/alchemy/devboards/db1000.c
> +++ b/arch/mips/alchemy/devboards/db1000.c
> @@ -98,8 +98,8 @@ int __init db1500_pci_setup(void)
>
>  static struct resource au1100_lcd_resources[] = {
>         [0] = {
> -               .start  = AU1100_LCD_PHYS_ADDR,
> -               .end    = AU1100_LCD_PHYS_ADDR + 0x800 - 1,
> +               .start  = KSEG1ADDR(AU1100_LCD_PHYS_ADDR),
> +               .end    = KSEG1ADDR(AU1100_LCD_PHYS_ADDR + 0x800 - 1),
>                 .flags  = IORESOURCE_MEM,
>         },
>         [1] = {
> diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
> index 1a04154bc535..70b96e9ea454 100644
> --- a/drivers/video/fbdev/au1100fb.c
> +++ b/drivers/video/fbdev/au1100fb.c
> @@ -380,11 +380,6 @@ static struct au1100fb_panel known_lcd_panels[] =
>  #define panel_is_color(panel) (panel->control_base & LCD_CONTROL_PC)
>  #define panel_swap_rgb(panel) (panel->control_base & LCD_CONTROL_CCO)
>
> -#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
> -/* This is only defined to be able to compile this driver on non-mips platforms */
> -#define KSEG1ADDR(x) (x)
> -#endif
> -
>  #define DRIVER_NAME "au1100fb"
>  #define DRIVER_DESC "LCD controller driver for AU1100 processors"
>
> @@ -764,7 +759,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
>                 return -EBUSY;
>         }
>
> -       fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
> +       fbdev->regs = (struct au1100fb_regs*)fbdev->info.fix.mmio_start;

Changing fix.mmio_start would probably break userspace.

KSEG1ADDR() is basically a cheaper way of calling ioremap().
Looking at the MIPS implementation, it can probably just be replaced
by a call to ioremap():
https://elixir.bootlin.com/linux/v6.19.3/source/arch/mips/mm/ioremap.c#L71

>
>         pr_devel("Register memory map at %p", fbdev->regs);
>         pr_devel("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2026-03-06  8:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 14:03 drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? kernel test robot
2026-03-04 18:23 ` Helge Deller
2026-03-05  8:07   ` Uwe Kleine-König
2026-03-05  8:57     ` Helge Deller
2026-03-05 16:30       ` Uwe Kleine-König
2026-03-06  7:57       ` Geert Uytterhoeven
2026-03-06  8:37         ` Uwe Kleine-König
2026-03-06  8:47           ` Geert Uytterhoeven

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.