mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fbdev: fbmem: mark get_fb_unmapped_area() static
@ 2023-05-16 20:22 Arnd Bergmann
  2023-05-17  7:02 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-05-16 20:22 UTC (permalink / raw)
  To: Daniel Vetter, Helge Deller
  Cc: Arnd Bergmann, Javier Martinez Canillas, Thomas Zimmermann,
	Geert Uytterhoeven, linux-fbdev, dri-devel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

There is a global function with this name on sparc, but no
global declaration:

drivers/video/fbdev/core/fbmem.c:1469:15: error: no previous prototype for 'get_fb_unmapped_area'

Make the generic definition static to avoid this warning. On
sparc, this is never seen.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/video/fbdev/core/fbmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index e808dc86001c..28739f1cb5e7 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1468,7 +1468,7 @@ __releases(&info->lock)
 }
 
 #if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && !defined(CONFIG_MMU)
-unsigned long get_fb_unmapped_area(struct file *filp,
+static unsigned long get_fb_unmapped_area(struct file *filp,
 				   unsigned long addr, unsigned long len,
 				   unsigned long pgoff, unsigned long flags)
 {
-- 
2.39.2


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

* Re: [PATCH] fbdev: fbmem: mark get_fb_unmapped_area() static
  2023-05-16 20:22 [PATCH] fbdev: fbmem: mark get_fb_unmapped_area() static Arnd Bergmann
@ 2023-05-17  7:02 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2023-05-17  7:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Daniel Vetter, Helge Deller, Arnd Bergmann,
	Javier Martinez Canillas, Thomas Zimmermann, linux-fbdev,
	dri-devel, linux-kernel

Hi Arnd,

On Tue, May 16, 2023 at 10:23 PM Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> There is a global function with this name on sparc, but no
> global declaration:
>
> drivers/video/fbdev/core/fbmem.c:1469:15: error: no previous prototype for 'get_fb_unmapped_area'
>
> Make the generic definition static to avoid this warning. On
> sparc, this is never seen.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for your patch!

> --- a/drivers/video/fbdev/core/fbmem.c
> +++ b/drivers/video/fbdev/core/fbmem.c
> @@ -1468,7 +1468,7 @@ __releases(&info->lock)
>  }
>
>  #if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && !defined(CONFIG_MMU)
> -unsigned long get_fb_unmapped_area(struct file *filp,
> +static unsigned long get_fb_unmapped_area(struct file *filp,
>                                    unsigned long addr, unsigned long len,
>                                    unsigned long pgoff, unsigned long flags)
>  {

LGTM, as this is unrelated to the SPARC function, and SPARC does
not support nommu (yet? ;-)

drivers/video/fbdev/Kconfig:config FB_PROVIDE_GET_FB_UNMAPPED_AREA
drivers/video/fbdev/Kconfig-    bool
drivers/video/fbdev/Kconfig-    depends on FB
drivers/video/fbdev/Kconfig-    help
drivers/video/fbdev/Kconfig-      Allow generic frame-buffer to
provide get_fb_unmapped_area
drivers/video/fbdev/Kconfig-      function.

Probably you want to update this help text, too. E.g.
"to provide shareable character device support on nommu"?

This seems to be selected only by DRM_STM.

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] 2+ messages in thread

end of thread, other threads:[~2023-05-17  7:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16 20:22 [PATCH] fbdev: fbmem: mark get_fb_unmapped_area() static Arnd Bergmann
2023-05-17  7:02 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome