mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] prio_tree.c: quiet sparse noise
@ 2010-01-14 22:16 H Hartley Sweeten
  2010-01-15  0:52 ` Li Zefan
  0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2010-01-14 22:16 UTC (permalink / raw)
  To: Linux Kernel

prio_tree.c: quiet sparse noise

The function prio_tree_init is called during start_kernel. Since it
is an __init function it is not exposed as an exported symbol.
A sparse build produces the following warning because of this:

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

Quiet the warning by declaring the function as an extern before
it's definition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

diff --git a/lib/prio_tree.c b/lib/prio_tree.c
index ccfd850..a677200 100644
--- a/lib/prio_tree.c
+++ b/lib/prio_tree.c
@@ -68,6 +68,9 @@ static void get_index(const struct prio_tree_root *root,
 
 static unsigned long index_bits_to_maxindex[BITS_PER_LONG];
 
+/* Keep sparse happy since this is not an EXPORT_SYMBOL */
+extern void prio_tree_init(void);
+
 void __init prio_tree_init(void)
 {
 	unsigned int i;

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

end of thread, other threads:[~2010-01-15  1:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-14 22:16 [PATCH] prio_tree.c: quiet sparse noise H Hartley Sweeten
2010-01-15  0:52 ` Li Zefan
2010-01-15  1:34   ` 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

all inboxes | Powered by JetHome®