* [PATCH] kernel: resource.c: local functions should not be exposed globally
@ 2012-04-12 20:50 H Hartley Sweeten
0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2012-04-12 20:50 UTC (permalink / raw)
To: Linux Kernel
The function reallocate_resource 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 'reallocate_resource' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
diff --git a/kernel/resource.c b/kernel/resource.c
index 7e8ea66..1e3031e 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -470,7 +470,7 @@ static int find_resource(struct resource *root, struct resource *new,
* @newsize: new size of the resource descriptor
* @constraint: the size and alignment constraints to be met.
*/
-int reallocate_resource(struct resource *root, struct resource *old,
+static int reallocate_resource(struct resource *root, struct resource *old,
resource_size_t newsize,
struct resource_constraint *constraint)
{
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-12 20:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 20:50 [PATCH] kernel: resource.c: local functions should not be exposed globally H Hartley Sweeten
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).