mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] prio_tree.c: quiet sparse noise
Date: Fri, 15 Jan 2010 08:52:12 +0800	[thread overview]
Message-ID: <4B4FBC3C.5090507@cn.fujitsu.com> (raw)
In-Reply-To: <201001141516.27305.hartleys@visionengravers.com>

H Hartley Sweeten wrote:
> 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.
> 

Why don't you add a declaration of prio_tree_init() to prio_tree.h,
and let kernel/main.c include it?

> 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;
> --

  reply	other threads:[~2010-01-15  0:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-14 22:16 H Hartley Sweeten
2010-01-15  0:52 ` Li Zefan [this message]
2010-01-15  1:34   ` H Hartley Sweeten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B4FBC3C.5090507@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=hartleys@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®