* [PATCH] proc_devtree: fix THIS_MODULE without module.h
@ 2010-01-07 2:19 Jeremy Kerr
2010-01-09 11:01 ` Alexey Dobriyan
0 siblings, 1 reply; 4+ messages in thread
From: Jeremy Kerr @ 2010-01-07 2:19 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Alexey Dobriyan
Commit e22f628395432b967f2f505858c64450f7835365 introduced a build
breakage for ARM devtree work: the THIS_MODULE macro was added, but we
don't have module.h
This change adds the necessary #include to get THIS_MODULE defined.
While we could just replace it with NULL (PROC_FS is a bool, not a
tristate), using THIS_MODULE will prevent unexpected breakage if we
ever do compile this as a module.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
---
fs/proc/proc_devtree.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 0ec4511..f8650dc 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -11,6 +11,7 @@
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/of.h>
+#include <linux/module.h>
#include <asm/prom.h>
#include <asm/uaccess.h>
#include "internal.h"
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] proc_devtree: fix THIS_MODULE without module.h
2010-01-07 2:19 [PATCH] proc_devtree: fix THIS_MODULE without module.h Jeremy Kerr
@ 2010-01-09 11:01 ` Alexey Dobriyan
2010-01-11 22:58 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2010-01-09 11:01 UTC (permalink / raw)
To: Jeremy Kerr; +Cc: linuxppc-dev
On Thu, Jan 07, 2010 at 01:19:13PM +1100, Jeremy Kerr wrote:
> Commit e22f628395432b967f2f505858c64450f7835365 introduced a build
> breakage for ARM devtree work: the THIS_MODULE macro was added, but we
> don't have module.h
>
> This change adds the necessary #include to get THIS_MODULE defined.
> While we could just replace it with NULL (PROC_FS is a bool, not a
> tristate), using THIS_MODULE will prevent unexpected breakage if we
> ever do compile this as a module.
I'd say, remove .owner line.
It definitely not needed in non-modular code.
> --- a/fs/proc/proc_devtree.c
> +++ b/fs/proc/proc_devtree.c
> @@ -11,6 +11,7 @@
> #include <linux/stat.h>
> #include <linux/string.h>
> #include <linux/of.h>
> +#include <linux/module.h>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] proc_devtree: fix THIS_MODULE without module.h
2010-01-09 11:01 ` Alexey Dobriyan
@ 2010-01-11 22:58 ` Grant Likely
2010-01-12 17:41 ` Alexey Dobriyan
0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2010-01-11 22:58 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: Jeremy Kerr, linuxppc-dev
On Sat, Jan 9, 2010 at 4:01 AM, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> On Thu, Jan 07, 2010 at 01:19:13PM +1100, Jeremy Kerr wrote:
>> Commit e22f628395432b967f2f505858c64450f7835365 introduced a build
>> breakage for ARM devtree work: the THIS_MODULE macro was added, but we
>> don't have module.h
>>
>> This change adds the necessary #include to get THIS_MODULE defined.
>> While we could just replace it with NULL (PROC_FS is a bool, not a
>> tristate), using THIS_MODULE will prevent unexpected breakage if we
>> ever do compile this as a module.
>
> I'd say, remove .owner line.
> It definitely not needed in non-modular code.
No. Jeremy's fix is the better one. Having the .owner line doesn't
cost anything and it is better to have it populated; even if only as
an example.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] proc_devtree: fix THIS_MODULE without module.h
2010-01-11 22:58 ` Grant Likely
@ 2010-01-12 17:41 ` Alexey Dobriyan
0 siblings, 0 replies; 4+ messages in thread
From: Alexey Dobriyan @ 2010-01-12 17:41 UTC (permalink / raw)
To: Grant Likely; +Cc: Jeremy Kerr, linuxppc-dev
On Mon, Jan 11, 2010 at 03:58:47PM -0700, Grant Likely wrote:
> On Sat, Jan 9, 2010 at 4:01 AM, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> > I'd say, remove .owner line.
> > It definitely not needed in non-modular code.
>
> No. Jeremy's fix is the better one. Having the .owner line doesn't
> cost anything and it is better to have it populated; even if only as
> an example.
Core proc code doesn't use it anymore.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-12 17:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07 2:19 [PATCH] proc_devtree: fix THIS_MODULE without module.h Jeremy Kerr
2010-01-09 11:01 ` Alexey Dobriyan
2010-01-11 22:58 ` Grant Likely
2010-01-12 17:41 ` Alexey Dobriyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).