Re: [PATCH 01/12] backports: make compat module use subsys_initcall()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 13, 2013 at 5:02 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> On Fri, 2013-05-10 at 17:26 -0700, Luis R. Rodriguez wrote:
>> From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxxxxxxxx>
>>
>> This is a no-op for the modular use case of the
>> backports project but by enabling this it allows
>> for developers a way to embed the backports releases
>> onto a target source Linux directory, with obvious
>> pending modifications, by adding our backport_init()
>> onto the target kernel's init/main.c start_kernel().
>>
>> Enable this theoretical use case. Hackers welcome to
>> go play on this theoretical integration strategy now.
>
> I applied all but this one, it caused a compiler warning that seemed
> important (missing an include?)
>
> /tmp/i/compat/main.c:83:1: warning: data definition has no type or
> storage class [enabled by default]
> /tmp/i/compat/main.c:83:1: warning: type defaults to ‘int’ in
> declaration of ‘__exitcall’ [-Wimplicit-int]
> /tmp/i/compat/main.c:83:1: warning: parameter names (without types) in
> function declaration [enabled by default]
> /tmp/i/compat/main.c:76:123: warning: ‘backport_exit’ defined but not
> used [-Wunused-function]

Sorry can you try this?

>From e9b18b9f99716fb382e7b8e2cde8248fc82806cf Mon Sep 17 00:00:00 2001
From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxxxxxxxx>
Date: Wed, 8 May 2013 19:20:55 +0000
Subject: [PATCH v2] backports: make compat module use subsys_initcall()

This is a no-op for the modular use case of the
backports project but by enabling this it allows
for developers a way to embed the backports releases
onto a target source Linux directory, with obvious
pending modifications, by adding our backport_init()
onto the target kernel's init/main.c start_kernel().

Enable this theoretical use case. Hackers welcome to
go play on this theoretical integration strategy now.

Cc: pstew@xxxxxxxxxxxx
Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxxxxx>
---
 backport/compat/main.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/backport/compat/main.c b/backport/compat/main.c
index 90ce751..394e413 100644
--- a/backport/compat/main.c
+++ b/backport/compat/main.c
@@ -1,4 +1,5 @@
 #include <linux/module.h>
+#include <linux/init.h>
 #include <linux/pm_qos.h>
 #include <linux/workqueue.h>
 #include "compat-2.6.34.h"
@@ -69,7 +70,7 @@ static int __init backport_init(void)

         return 0;
 }
-module_init(backport_init);
+subsys_initcall(backport_init);

 static void __exit backport_exit(void)
 {
@@ -78,5 +79,4 @@ static void __exit backport_exit(void)

         return;
 }
-module_exit(backport_exit);
-
+__exitcall(backport_exit);
--
1.7.10.4


  Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux