mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: backports@vger.kernel.org
Cc: ben@decadent.org.uk, noelamac@gmail.com,
	linux-kernel@vger.kernel.org, rusty@rustcorp.com.au,
	andi@firstfloor.org,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Subject: [RFC 30/30] compat: use backport_ prefix for main compat module calls
Date: Wed, 20 Mar 2013 02:22:55 -0700	[thread overview]
Message-ID: <1363771375-31715-31-git-send-email-mcgrof@do-not-panic.com> (raw)
In-Reply-To: <1363771375-31715-1-git-send-email-mcgrof@do-not-panic.com>

From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 compat/compat-2.6.34.c        |    8 ++++----
 compat/compat-2.6.34.h        |    4 ++--
 compat/main.c                 |   25 +++++++++++++------------
 compat/pm_qos_params.c        |    4 ++--
 include/linux/compat-2.6.25.h |   10 +++++-----
 include/linux/compat-2.6.34.h |    6 ------
 include/linux/compat-2.6.36.h |    8 ++++----
 include/linux/compat-2.6.h    |    8 ++++----
 8 files changed, 34 insertions(+), 39 deletions(-)

diff --git a/compat/compat-2.6.34.c b/compat/compat-2.6.34.c
index 7206007..4b23c81 100644
--- a/compat/compat-2.6.34.c
+++ b/compat/compat-2.6.34.c
@@ -12,16 +12,16 @@
 
 #include "compat-2.6.34.h"
 
-static mmc_pm_flag_t compat_mmc_pm_flags;
+static mmc_pm_flag_t backport_mmc_pm_flags;
 
-void init_compat_mmc_pm_flags(void)
+void backport_init_mmc_pm_flags(void)
 {
-	compat_mmc_pm_flags = 0;
+	backport_mmc_pm_flags = 0;
 }
 
 mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func)
 {
-	return compat_mmc_pm_flags;
+	return backport_mmc_pm_flags;
 }
 
 int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags)
diff --git a/compat/compat-2.6.34.h b/compat/compat-2.6.34.h
index 173fe52..b36b441 100644
--- a/compat/compat-2.6.34.h
+++ b/compat/compat-2.6.34.h
@@ -7,11 +7,11 @@
 
 #include <linux/mmc/sdio_func.h>
 
-void init_compat_mmc_pm_flags(void);
+void backport_init_mmc_pm_flags(void);
 
 #else /* Kernels >= 2.6.34 */
 
-static inline void init_compat_mmc_pm_flags(void)
+static inline void backport_init_mmc_pm_flags(void)
 {
 }
 
diff --git a/compat/main.c b/compat/main.c
index 972c142..4e72ca5 100644
--- a/compat/main.c
+++ b/compat/main.c
@@ -1,7 +1,8 @@
 #include <linux/module.h>
+#include "compat-2.6.34.h"
 
 MODULE_AUTHOR("Luis R. Rodriguez");
-MODULE_DESCRIPTION("Kernel compatibility module");
+MODULE_DESCRIPTION("Kernel backport module");
 MODULE_LICENSE("GPL");
 
 #ifndef COMPAT_BASE
@@ -41,17 +42,17 @@ module_param(compat_version, charp, 0400);
 MODULE_PARM_DESC(compat_version,
 		 "Version of the kernel compat backport work");
 
-void compat_dependency_symbol(void)
+void backport_dependency_symbol(void)
 {
 }
-EXPORT_SYMBOL_GPL(compat_dependency_symbol);
+EXPORT_SYMBOL_GPL(backport_dependency_symbol);
 
 
-static int __init compat_init(void)
+static int __init backport_init(void)
 {
-	compat_pm_qos_power_init();
-	compat_system_workqueue_create();
-	init_compat_mmc_pm_flags();
+	backport_pm_qos_power_init();
+	backport_system_workqueue_create();
+	backport_init_mmc_pm_flags();
 
 	printk(KERN_INFO
 	       COMPAT_PROJECT " backport release: "
@@ -65,14 +66,14 @@ static int __init compat_init(void)
 
         return 0;
 }
-module_init(compat_init);
+module_init(backport_init);
 
-static void __exit compat_exit(void)
+static void __exit backport_exit(void)
 {
-	compat_pm_qos_power_deinit();
-	compat_system_workqueue_destroy();
+	backport_pm_qos_power_deinit();
+	backport_system_workqueue_destroy();
 
         return;
 }
-module_exit(compat_exit);
+module_exit(backport_exit);
 
diff --git a/compat/pm_qos_params.c b/compat/pm_qos_params.c
index 833d98c..42785ce 100644
--- a/compat/pm_qos_params.c
+++ b/compat/pm_qos_params.c
@@ -414,7 +414,7 @@ static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,
 /*
  * This initializes pm-qos for older kernels.
  */
-int compat_pm_qos_power_init(void)
+int backport_pm_qos_power_init(void)
 {
 	int ret = 0;
 
@@ -442,7 +442,7 @@ int compat_pm_qos_power_init(void)
 	return ret;
 }
 
-int compat_pm_qos_power_deinit(void)
+int backport_pm_qos_power_deinit(void)
 {
 	int ret = 0;
 
diff --git a/include/linux/compat-2.6.25.h b/include/linux/compat-2.6.25.h
index 5d4fe38..a08e0b2 100644
--- a/include/linux/compat-2.6.25.h
+++ b/include/linux/compat-2.6.25.h
@@ -193,11 +193,11 @@ typedef u32 phys_addr_t;
  * This pm-qos implementation is copied verbatim from the kernel
  * written by mark gross mgross@linux.intel.com. You don't have
  * to do anythinig to use pm-qos except use the same exported
- * routines as used in newer kernels. The compat_pm_qos_power_init()
+ * routines as used in newer kernels. The backport_pm_qos_power_init()
  * defned below is used by the compat module to initialize pm-qos.
  */
-int compat_pm_qos_power_init(void);
-int compat_pm_qos_power_deinit(void);
+int backport_pm_qos_power_init(void);
+int backport_pm_qos_power_deinit(void);
 
 /*
  * 2.6.25 adds PM_EVENT_HIBERNATE as well here but
@@ -314,12 +314,12 @@ extern int strict_strtol(const char *, unsigned int, long *);
  * Kernels >= 2.6.25 have pm-qos and its initialized as part of
  * the bootup process
  */
-static inline int compat_pm_qos_power_init(void)
+static inline int backport_pm_qos_power_init(void)
 {
 	return 0;
 }
 
-static inline int compat_pm_qos_power_deinit(void)
+static inline int backport_pm_qos_power_deinit(void)
 {
 	return 0;
 }
diff --git a/include/linux/compat-2.6.34.h b/include/linux/compat-2.6.34.h
index c206633..09d5922 100644
--- a/include/linux/compat-2.6.34.h
+++ b/include/linux/compat-2.6.34.h
@@ -25,8 +25,6 @@ typedef unsigned int mmc_pm_flag_t;
 extern mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func);
 extern int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags);
 
-void init_compat_mmc_pm_flags(void);
-
 #define netdev_mc_count(dev) ((dev)->mc_count)
 #define netdev_mc_empty(dev) (netdev_mc_count(dev) == 0)
 
@@ -341,10 +339,6 @@ static inline struct sock *sk_entry(const struct hlist_node *node)
 
 #else /* Kernels >= 2.6.34 */
 
-static inline void init_compat_mmc_pm_flags(void)
-{
-}
-
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)) */
 
 
diff --git a/include/linux/compat-2.6.36.h b/include/linux/compat-2.6.36.h
index b4d3761..d90b84f 100644
--- a/include/linux/compat-2.6.36.h
+++ b/include/linux/compat-2.6.36.h
@@ -161,8 +161,8 @@ extern struct workqueue_struct *system_long_wq;
 #define system_nrt_wq LINUX_BACKPORT(system_nrt_wq)
 extern struct workqueue_struct *system_nrt_wq;
 
-void compat_system_workqueue_create(void);
-void compat_system_workqueue_destroy(void);
+void backport_system_workqueue_create(void);
+void backport_system_workqueue_destroy(void);
 
 #define schedule_work LINUX_BACKPORT(schedule_work)
 int schedule_work(struct work_struct *work);
@@ -191,11 +191,11 @@ extern unsigned int work_busy(struct work_struct *work);
 
 #else
 
-static inline void compat_system_workqueue_create(void)
+static inline void backport_system_workqueue_create(void)
 {
 }
 
-static inline void compat_system_workqueue_destroy(void)
+static inline void backport_system_workqueue_destroy(void)
 {
 }
 
diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h
index d1d24d0..5d75919 100644
--- a/include/linux/compat-2.6.h
+++ b/include/linux/compat-2.6.h
@@ -28,16 +28,16 @@
  * To the call to the initfn we added the symbol dependency on compat
  * to make sure that compat.ko gets loaded for any compat modules.
  */
-void compat_dependency_symbol(void);
+void backport_dependency_symbol(void);
 
 #undef module_init
 #define module_init(initfn)						\
-	static int __init __init_compat(void)				\
+	static int __init __init_backport(void)				\
 	{								\
-		compat_dependency_symbol();				\
+		backport_dependency_symbol();				\
 		return initfn();					\
 	}								\
-	int init_module(void) __attribute__((alias("__init_compat")));
+	int init_module(void) __attribute__((alias("__init_backport")));
 
 /*
  * Each compat file represents compatibility code for new kernel
-- 
1.7.10.4


  parent reply	other threads:[~2013-03-20  9:30 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20  9:22 [RFC 00/30] compat: deal with kernel backport namespace Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 01/30] compat: add LINUX_BACKPORT() for prefixing symbols Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 02/30] compat: embrace LINUX_BACKPORT() for v2.6.23 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 03/30] compat: embrace LINUX_BACKPORT() for v2.6.24 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 04/30] compat: embrace LINUX_BACKPORT() for v2.6.25 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 05/30] compat: embrace LINUX_BACKPORT() for v2.6.26 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 06/30] compat: embrace LINUX_BACKPORT() for v2.6.27 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 07/30] compat: embrace LINUX_BACKPORT() for v2.6.28 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 08/30] compat: embrace LINUX_BACKPORT() for v2.6.29 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 09/30] compat: embrace LINUX_BACKPORT() for v2.6.31 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 10/30] compat: embrace LINUX_BACKPORT() for v2.6.32 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 11/30] compat: embrace LINUX_BACKPORT() for v2.6.33 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 12/30] compat: embrace LINUX_BACKPORT() for v2.6.34 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 13/30] compat: embrace LINUX_BACKPORT() for v2.6.35 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 14/30] compat: embrace LINUX_BACKPORT() for v2.6.36 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 15/30] compat: embrace LINUX_BACKPORT() for v2.6.37 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 16/30] compat: embrace LINUX_BACKPORT() for v2.6.38 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 17/30] compat: embrace LINUX_BACKPORT() for v2.6.39 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 18/30] compat: embrace LINUX_BACKPORT() for v3.0 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 19/30] compat: embrace LINUX_BACKPORT() for v3.1 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 20/30] compat: embrace LINUX_BACKPORT() for v3.2 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 21/30] compat: embrace LINUX_BACKPORT() for v3.3 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 22/30] compat: embrace LINUX_BACKPORT() for v3.4 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 23/30] compat: embrace LINUX_BACKPORT() for v3.7 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 24/30] compat: embrace LINUX_BACKPORT() for v3.8 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 25/30] compat: embrace LINUX_BACKPORT() for cordic Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 26/30] compat: embrace LINUX_BACKPORT() for crc8 Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 27/30] compat: embrace LINUX_BACKPORT() for kfifo Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 28/30] compat: embrace LINUX_BACKPORT() for pm_qos_params Luis R. Rodriguez
2013-03-20  9:22 ` [RFC 29/30] compat: embrace LINUX_BACKPORT() for uidgid Luis R. Rodriguez
2013-03-20  9:22 ` Luis R. Rodriguez [this message]
2013-03-21  1:51 ` [RFC 00/30] compat: deal with kernel backport namespace Luis R. Rodriguez

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=1363771375-31715-31-git-send-email-mcgrof@do-not-panic.com \
    --to=mcgrof@do-not-panic.com \
    --cc=andi@firstfloor.org \
    --cc=backports@vger.kernel.org \
    --cc=ben@decadent.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noelamac@gmail.com \
    --cc=rusty@rustcorp.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome