From: Arnd Bergmann <arnd@arndb.de>
To: "Martin J. Bligh" <mbligh@mbligh.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: EXPORT_SYMBOL generates "is deprecated" noise
Date: Mon, 8 Aug 2005 15:46:22 +0200 [thread overview]
Message-ID: <200508081546.23125.arnd@arndb.de> (raw)
In-Reply-To: <253710000.1123439204@[10.10.2.4]>
On Sünndag 07 August 2005 20:26, Martin J. Bligh wrote:
> Oh, I'm being an idiot and looking at the wrong tree. It's __deprecated,
> but I still can't think of a clean way to locally undefine that for
> just EXPORT_SYMBOL.
We could in theory create a new EXPORT_SYMBOL variant that does not
reference the symbol directly. This does a little less compile-time
checks but helps reduce the noise. The big advantage of this
would be that we could once again build kernels with -Werror on
developer machines.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/include/linux/module.h b/include/linux/module.h
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -182,21 +182,26 @@ void *__symbol_get_gpl(const char *symbo
#endif
/* For every exported symbol, place a struct in the __ksymtab section */
-#define __EXPORT_SYMBOL(sym, sec) \
- __CRC_SYMBOL(sym, sec) \
- static const char __kstrtab_##sym[] \
+#define __EXPORT_SYMBOL(name, sym, sec) \
+ __CRC_SYMBOL(name, sec) \
+ static const char __kstrtab_##name[] \
__attribute__((section("__ksymtab_strings"))) \
- = MODULE_SYMBOL_PREFIX #sym; \
- static const struct kernel_symbol __ksymtab_##sym \
+ = MODULE_SYMBOL_PREFIX #name; \
+ static const struct kernel_symbol __ksymtab_##name \
__attribute_used__ \
__attribute__((section("__ksymtab" sec), unused)) \
- = { (unsigned long)&sym, __kstrtab_##sym }
+ = { (unsigned long)&sym, __kstrtab_##name }
#define EXPORT_SYMBOL(sym) \
- __EXPORT_SYMBOL(sym, "")
+ __EXPORT_SYMBOL(sym, sym, "")
#define EXPORT_SYMBOL_GPL(sym) \
- __EXPORT_SYMBOL(sym, "_gpl")
+ __EXPORT_SYMBOL(sym, sym, "_gpl")
+
+#define EXPORT_DEPRECATED_SYMBOL(sym) \
+ extern void __deprecated_ ## sym \
+ __attribute__((alias(#sym))); \
+ __EXPORT_SYMBOL(sym, __deprecated_ ## sym, "_gpl")
#endif
next prev parent reply other threads:[~2005-08-08 13:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-07 18:07 EXPORT_SYMBOL generates "is deprecated" noise Martin J. Bligh
2005-08-07 18:23 ` Adrian Bunk
2005-08-07 18:55 ` Martin J. Bligh
2005-08-07 19:06 ` Adrian Bunk
2005-08-07 19:13 ` Martin J. Bligh
2005-08-07 18:26 ` Martin J. Bligh
2005-08-08 13:46 ` Arnd Bergmann [this message]
2005-08-07 19:15 ` Russell King
2005-08-08 6:28 ` Denis Vlasenko
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=200508081546.23125.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@mbligh.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.