From 8ae967309876a9297dedfdf64dfcca406639686f Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Tue, 19 Mar 2013 17:57:13 -0700 Subject: [PATCH] compat: add LINUX_BACKPORT() for prefixing symbols Ben Hutchings notes that "compat" is already taken as a prefix for symbols and while this is only slightly true in practice its best we avoid any future issues. Others in the past have noted issues with symbols exported by backporting effort to conflict with other symbols that might be preferred by the running kernel. In the worst case scenerio we'd have the same subsystems with two eras with two sets of drivers using a subystem from an era each. This patch doesn't address that but tries to address the namespace conflict by compat itself. The best alternative I was hoping for was to use core module symbol namespaces but after reviewing that effort introduced in 2007 by Andi Kleen [0] I see in the end Rusty Russell nack'd these patches [1] so we're left with dealing with symbol renaming. Define LINUX_BACKPORT() to be used to allow us to rename symbols with a backport_ prefix. The the cleanest, but its a start. [0] http://thread.gmane.org/gmane.linux.network/78674 [1] http://article.gmane.org/gmane.linux.kernel/606885 Signed-off-by: Luis R. Rodriguez --- include/linux/compat-2.6.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h index 68e95d58a67b..d1d24d039a91 100644 --- a/include/linux/compat-2.6.h +++ b/include/linux/compat-2.6.h @@ -3,6 +3,8 @@ #ifndef __ASSEMBLY__ +#define LINUX_BACKPORT(__sym) backport_ ##__sym + #include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) #include -- 2.30.2