* [PATCH] mm: page-writeback.c: local functions should not be exposed globally
@ 2012-04-12 20:44 H Hartley Sweeten
2012-04-14 9:42 ` Fengguang Wu
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2012-04-12 20:44 UTC (permalink / raw)
To: Linux Kernel; +Cc: linux-mm
The function global_dirtyable_memory is only referenced in this file and
should be marked static to prevent it from being exposed globally.
This quiets the sparse warning:
warning: symbol 'global_dirtyable_memory' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 26adea8..9dec97f 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -204,7 +204,7 @@ static unsigned long highmem_dirtyable_memory(unsigned long total)
* Returns the global number of pages potentially available for dirty
* page cache. This is the base value for the global dirty limits.
*/
-unsigned long global_dirtyable_memory(void)
+static unsigned long global_dirtyable_memory(void)
{
unsigned long x;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: page-writeback.c: local functions should not be exposed globally
2012-04-12 20:44 [PATCH] mm: page-writeback.c: local functions should not be exposed globally H Hartley Sweeten
@ 2012-04-14 9:42 ` Fengguang Wu
0 siblings, 0 replies; 2+ messages in thread
From: Fengguang Wu @ 2012-04-14 9:42 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: Linux Kernel, linux-mm
On Thu, Apr 12, 2012 at 01:44:20PM -0700, H Hartley Sweeten wrote:
> The function global_dirtyable_memory is only referenced in this file and
> should be marked static to prevent it from being exposed globally.
>
> This quiets the sparse warning:
>
> warning: symbol 'global_dirtyable_memory' was not declared. Should it be static?
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Applied, thanks!
Fengguang
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-14 9:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 20:44 [PATCH] mm: page-writeback.c: local functions should not be exposed globally H Hartley Sweeten
2012-04-14 9:42 ` Fengguang Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).