mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Helge Deller <deller@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
	oe-kbuild-all@lists.linux.dev,  linux-kernel@vger.kernel.org
Subject: Re: drivers/video/fbdev/au1100fb.c:448:46: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'?
Date: Thu, 5 Mar 2026 09:07:49 +0100	[thread overview]
Message-ID: <aak3k24kjfD55xNQ@monoceros> (raw)
In-Reply-To: <aah4opTMZeDDfWFG@carbonx1>

[-- 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 --]

  reply	other threads:[~2026-03-05  8:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 14:03 kernel test robot
2026-03-04 18:23 ` Helge Deller
2026-03-05  8:07   ` Uwe Kleine-König [this message]
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

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=aak3k24kjfD55xNQ@monoceros \
    --to=u.kleine-koenig@baylibre.com \
    --cc=deller@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@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

all inboxes | Powered by JetHome®