Skip to contentSkip to conversation

video: fb_defio.c: local functions should not be exposed globally

PATCH Applied H Hartley Sweeten 2 participants 2 messages May 3, 2012 – May 10, 2012 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: fb_defio.c: local functions should not be exposed globally

Functions not referenced outside of a source file should be marked static to prevent them from being exposed globally.

Quiets the sparse warning:

warning: symbol 'fb_deferred_io_page' was not declared. Should it be static?

Cc Jaya Kumar <[email protected]>
Cc Florian Tobias Schandinat <[email protected]>

---

drivers/video/fb_defio.c +1 -1
index 070f26f..1ddeb11 100644
@@ -23,7 +23,7 @@
 #include <linux/rmap.h>
 #include <linux/pagemap.h>
 
-struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs)
+static struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs)
 {
 	void *screen_base = (void __force *) info->screen_base;
 	struct page *page;
#1 lore raw
Quoted 10 lines · H Hartley Sweeten

Functions not referenced outside of a source file should be marked static to prevent them from being exposed globally.

Quiets the sparse warning:

warning: symbol 'fb_deferred_io_page' was not declared. Should it be static?

Cc Jaya Kumar <[email protected]>
Cc Florian Tobias Schandinat <[email protected]>

Applied.

Thanks,

Florian Tobias Schandinat

Quoted 17 lines

---

drivers/video/fb_defio.c +1 -1
index 070f26f..1ddeb11 100644
@@ -23,7 +23,7 @@
 #include <linux/rmap.h>
 #include <linux/pagemap.h>
 
-struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs)
+static struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs)
 {
 	void *screen_base = (void __force *) info->screen_base;
 	struct page *page;