Message ID | 1262830753.577814.127040702434.1.gpush@pororo (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | 7c540d9e3da38c3d1c15fb8059e4577a84ac0066 |
Delegated to: | Benjamin Herrenschmidt |
Headers | show |
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>
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.
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.
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"
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(+)