lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5287D3DA.4060601@linux.com>
Date:	Sat, 16 Nov 2013 21:21:46 +0100
From:	Levente Kurusa <levex@...ux.com>
To:	Felipe Contreras <felipe.contreras@...il.com>,
	linux-kernel@...r.kernel.org
CC:	Rusty Russell <rusty@...tcorp.com.au>, Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 3/5] cmdline: declare exported symbols immediately

2013-11-16 18:32 keltezéssel, Felipe Contreras írta:
> WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> +EXPORT_SYMBOL(memparse);
> 
> WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> +EXPORT_SYMBOL(get_option);
> 
> WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> +EXPORT_SYMBOL(get_options);
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@...il.com>
> ---
>  lib/cmdline.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/cmdline.c b/lib/cmdline.c
> index 5466333..d4932f7 100644
> --- a/lib/cmdline.c
> +++ b/lib/cmdline.c
> @@ -67,6 +67,7 @@ int get_option(char **str, int *pint)
>  
>  	return 1;
>  }
> +EXPORT_SYMBOL(get_option);
>  
>  /**
>   *	get_options - Parse a string into a list of integers
> @@ -112,6 +113,7 @@ char *get_options(const char *str, int nints, int *ints)
>  	ints[0] = i - 1;
>  	return (char *)str;
>  }
> +EXPORT_SYMBOL(get_options);
>  
>  /**
>   *	memparse - parse a string with mem suffixes into a number
> @@ -152,7 +154,4 @@ unsigned long long memparse(const char *ptr, char **retptr)
>  
>  	return ret;
>  }
> -
>  EXPORT_SYMBOL(memparse);
> -EXPORT_SYMBOL(get_option);
> -EXPORT_SYMBOL(get_options);
> 

I don't know about this one, but I have seen lots of files where EXPORT_SYMBOLs were
listed at the end of the file. To avoid misunderstanding, I still think that having the
exports after the function is more appropriate.

-- 
Regards,
Levente Kurusa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ