[PATCH 1/8] common/kallsyms.c: Fix sparse warning

Sascha Hauer s.hauer at pengutronix.de
Mon Feb 17 02:25:08 EST 2014


On Sun, Feb 16, 2014 at 11:24:30AM +0400, Alexander Shiyan wrote:
> CHECK   common/kallsyms.c
> common/kallsyms.c:170:12: warning: symbol 'kallsyms_lookup' was not declared. Should it be static?
> 
> Signed-off-by: Alexander Shiyan <shc_work at mail.ru>

Applied all, although with some of them I'm not sure whether the correct
fix would be to actually add the declaration to a header file instead of
making the symbol static.

Sascha

> ---
>  common/kallsyms.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/common/kallsyms.c b/common/kallsyms.c
> index 94dfcdc..121b77c 100644
> --- a/common/kallsyms.c
> +++ b/common/kallsyms.c
> @@ -167,10 +167,10 @@ static unsigned long get_symbol_pos(unsigned long addr,
>   *   It resides in a module.
>   * - We also guarantee that modname will be valid until rescheduled.
>   */
> -const char *kallsyms_lookup(unsigned long addr,
> -			    unsigned long *symbolsize,
> -			    unsigned long *offset,
> -			    char **modname, char *namebuf)
> +static const char *kallsyms_lookup(unsigned long addr,
> +				   unsigned long *symbolsize,
> +				   unsigned long *offset,
> +				   char **modname, char *namebuf)
>  {
>  	namebuf[KSYM_NAME_LEN - 1] = 0;
>  	namebuf[0] = 0;
> -- 
> 1.8.3.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list