fbdev: fbmem: mark get_fb_unmapped_area() static
Subsystems (2)
PATCH 1/1 fbdev: fbmem: mark get_fb_unmapped_area() static
From: Arnd Bergmann <[email protected]>
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.
--- drivers/video/fbdev/core/fbmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/core/fbmem.c +1 -1
@@ -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) {
Signature · 1 line
2.39.2
Hi Arnd,
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
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 <[email protected]>
Thanks for your patch!
drivers/video/fbdev/core/fbmem.c __releases(&info->lock) · line 1474
Quoted 11 lines
drivers/video/fbdev/core/fbmem.c +1
-1@@ -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_areadrivers/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
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
* Geert Uytterhoeven <[email protected]>:
Quoted 34 lines
Hi Arnd,
Quoted 15 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
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 <[email protected]>drivers/video/fbdev/core/fbmem.c __releases(&info->lock) · line 1474
Quoted 8 lines
drivers/video/fbdev/core/fbmem.c +1
-1@@ -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_AREAdrivers/video/fbdev/Kconfig- bool drivers/video/fbdev/Kconfig- depends on FB drivers/video/fbdev/Kconfig- help
Quoted 6 lines
drivers/video/fbdev/Kconfig-Allow generic frame-buffer to
provideget_fb_unmapped_areadrivers/video/fbdev/Kconfig-function.Probably you want to update this help text, too. E.g. "to provide shareable character device support on nommu"?
I've added Geerts suggestions and made it dependend on !MMU.
Applied to fbdev git tree as below.
Thanks!
Helge
From 9adfa68ca0ddd63007cdce60a8ffcb493bb30d97 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Subject: [PATCH] fbdev: fbmem: mark get_fb_unmapped_area() static
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.
Edit by Helge:
Update Kconfig text as suggested by Geert Uytterhoeven and make it dependend on !MMU.
drivers/video/fbdev/Kconfig +2 -2
@@ -121,10 +121,10 @@ config FB_SYS_IMAGEBLIT config FB_PROVIDE_GET_FB_UNMAPPED_AREA bool - depends on FB + depends on FB && !MMU help Allow generic frame-buffer to provide get_fb_unmapped_area - function. + function to provide shareable character device support on nommu. menuconfig FB_FOREIGN_ENDIAN bool "Framebuffer foreign endianness support"
drivers/video/fbdev/core/fbmem.c +3 -4
@@ -1467,8 +1467,8 @@ __releases(&info->lock)return 0 ; } -#if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA ) && !defined(CONFIG_MMU ) -unsigned long get_fb_unmapped_area (struct file *filp, +#if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA ) +static unsigned long get_fb_unmapped_area (struct file *filp,unsigned long addr,unsigned long len,unsigned long pgoff,unsigned long flags) {
@@ -1494,8 +1494,7 @@ static const struct file_operations fb_fops = { .open = fb_open, .release = fb_release,#if defined(HAVE_ARCH_FB_UNMAPPED_AREA ) || \ - (defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA ) && \ - !defined(CONFIG_MMU )) + defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA ) .get_unmapped_area = get_fb_unmapped_area,#endif #ifdef CONFIG_FB_DEFERRED_IO
Hi Helge,
Quoted 72 lines · Helge Deller
* Geert Uytterhoeven <[email protected]>:
Quoted 32 lines · Arnd Bergmann
Quoted 15 lines
From: Arnd Bergmann <[email protected]>
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 <[email protected]>drivers/video/fbdev/core/fbmem.c __releases(&info->lock) · line 1474
Quoted 8 lines
drivers/video/fbdev/core/fbmem.c +1
-1@@ -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_AREAdrivers/video/fbdev/Kconfig- bool drivers/video/fbdev/Kconfig- depends on FB drivers/video/fbdev/Kconfig- helpQuoted 6 lines
drivers/video/fbdev/Kconfig-Allow generic frame-buffer to
provideget_fb_unmapped_areadrivers/video/fbdev/Kconfig-function.Probably you want to update this help text, too. E.g. "to provide shareable character device support on nommu"?
I've added Geerts suggestions and made it dependend on !MMU.
Applied to fbdev git tree as below.
Thanks!
HelgeFrom
9adfa68ca0ddd63007cdce60a8ffcb493bb30d97Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Subject: [PATCH] fbdev: fbmem: markget_fb_unmapped_area()staticThere 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.
Edit by Helge:
UpdateKconfigtext as suggested by Geert Uytterhoeven and make it dependend on !MMU.Signed-off-by Arnd Bergmann <[email protected]>Signed-off-by Helge Deller <[email protected]>drivers/video/fbdev/Kconfig +0
-0
drivers/video/fbdev/Kconfig config FB_SYS_IMAGEBLIT · line 124
Quoted 5 lines
drivers/video/fbdev/Kconfig +1
-1@@ -121,10 +121,10 @@ config FB_SYS_IMAGEBLIT config FB_PROVIDE_GET_FB_UNMAPPED_AREA bool - depends on FB + depends on FB && !MMU
I expect this to cause a Kconfig warning when enabling DRM_STM with MMU=y (e.g. multi_v7_defconfig).ARCH_STM32 seems to support both MMU=y and MMU=n.
drivers/video/fbdev/Kconfig config FB_SYS_IMAGEBLIT · line 128
Quoted 5 lines
drivers/video/fbdev/Kconfig +1
-1help Allow generic frame-buffer to provide get_fb_unmapped_area - function. + function to provide shareable character device support on nommu.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Helge Deller
maintainerQuoted 76 lines · Geert Uytterhoeven
Hi Helge,
Quoted 73 lines · Helge Deller
* Geert Uytterhoeven <[email protected]>:
Quoted 32 lines · Arnd Bergmann
Quoted 15 lines
From: Arnd Bergmann <[email protected]>
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 <[email protected]>drivers/video/fbdev/core/fbmem.c __releases(&info->lock) · line 1474
Quoted 8 lines
drivers/video/fbdev/core/fbmem.c +1
-1@@ -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_AREAdrivers/video/fbdev/Kconfig- bool drivers/video/fbdev/Kconfig- depends on FB drivers/video/fbdev/Kconfig- helpQuoted 6 lines
drivers/video/fbdev/Kconfig-Allow generic frame-buffer to
provideget_fb_unmapped_areadrivers/video/fbdev/Kconfig-function.Probably you want to update this help text, too. E.g. "to provide shareable character device support on nommu"?
I've added Geerts suggestions and made it dependend on !MMU.
Applied to fbdev git tree as below.
Thanks!
HelgeFrom
9adfa68ca0ddd63007cdce60a8ffcb493bb30d97Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Subject: [PATCH] fbdev: fbmem: markget_fb_unmapped_area()staticThere 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.
Edit by Helge:
UpdateKconfigtext as suggested by Geert Uytterhoeven and make it dependend on !MMU.Signed-off-by Arnd Bergmann <[email protected]>Signed-off-by Helge Deller <[email protected]>drivers/video/fbdev/Kconfig +0
-0@@ -121,10 +121,10 @@ config FB_SYS_IMAGEBLIT
Quoted 8 lines
drivers/video/fbdev/Kconfig config FB_SYS_IMAGEBLIT · line 124
Quoted 4 lines
drivers/video/fbdev/Kconfig +1
-1config FB_PROVIDE_GET_FB_UNMAPPED_AREA bool - depends on FB + depends on FB && !MMUI expect this to cause a
Kconfigwarning when enablingDRM_STMwith MMU=y (e.g.multi_v7_defconfig).ARCH_STM32seems to support both MMU=y and MMU=n.
yes, probably.
I revert that part again, as it's the least invasive change.
Thanks.
Helge