From: Levente Kurusa <levex@linux.com>
To: Felipe Contreras <felipe.contreras@gmail.com>,
linux-kernel@vger.kernel.org
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 3/5] cmdline: declare exported symbols immediately
Date: Sat, 16 Nov 2013 21:21:46 +0100 [thread overview]
Message-ID: <5287D3DA.4060601@linux.com> (raw)
In-Reply-To: <1384623151-31302-4-git-send-email-felipe.contreras@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2013-11-16 20:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-16 17:32 [PATCH 0/5] Command line related cleanups Felipe Contreras
2013-11-16 17:32 ` [PATCH 1/5] kstrtox: remove redundant cleanup Felipe Contreras
2013-11-16 20:19 ` Levente Kurusa
2013-11-16 17:32 ` [PATCH 2/5] cmdline: fix style issues Felipe Contreras
2013-11-16 17:32 ` [PATCH 3/5] cmdline: declare exported symbols immediately Felipe Contreras
2013-11-16 20:21 ` Levente Kurusa [this message]
2013-11-16 20:27 ` Felipe Contreras
2013-11-16 17:32 ` [PATCH 4/5] kstrtox: remove redundant casts Felipe Contreras
2013-11-16 17:32 ` [PATCH 5/5] params: improve standard definitions Felipe Contreras
2013-11-21 1:43 ` Rusty Russell
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=5287D3DA.4060601@linux.com \
--to=levex@linux.com \
--cc=akpm@linux-foundation.org \
--cc=felipe.contreras@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.