[PATCH] fbdev: Make fb_modesetting_disabled() static inline
Thomas Zimmermann
tzimmermann at suse.de
Thu Nov 17 12:07:19 UTC 2022
Am 17.11.22 um 12:47 schrieb Thomas Zimmermann:
> Make fb_modesetting_disabled() a static-inline function when it is
> defined in the header file. Avoid the linker error shown below.
>
> ld: drivers/video/fbdev/core/fbmon.o: in function `fb_modesetting_disabled':
> fbmon.c:(.text+0x1e4): multiple definition of `fb_modesetting_disabled'; drivers/video/fbdev/core/fbmem.o:fbmem.c:(.text+0x1bac): first defined here
>
> A bug report is at [1].
>
> Reported-by: Stephen Rothwell <sfr at canb.auug.org.au>
> Reported-by: kernel test robot <lkp at intel.com>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> Fixes: 0ba2fa8cbd29 ("fbdev: Add support for the nomodeset kernel parameter")
> Cc: Javier Martinez Canillas <javierm at redhat.com>
Javier gave his r-b via irc.
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: Helge Deller <deller at gmx.de>
> Cc: linux-fbdev at vger.kernel.org
> Cc: dri-devel at lists.freedesktop.org
> Link: https://lore.kernel.org/dri-devel/20221117183214.2473e745@canb.auug.org.au/T/#u # 1
> ---
> include/linux/fb.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/fb.h b/include/linux/fb.h
> index 3a822e4357b12..ea421724f7338 100644
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -807,7 +807,7 @@ extern int fb_find_mode(struct fb_var_screeninfo *var,
> #if defined(CONFIG_VIDEO_NOMODESET)
> bool fb_modesetting_disabled(const char *drvname);
> #else
> -bool fb_modesetting_disabled(const char *drvname)
> +static inline bool fb_modesetting_disabled(const char *drvname)
> {
> return false;
> }
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20221117/1e8b75a8/attachment.sig>
More information about the dri-devel
mailing list