linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] modules: fix build error with !CONFIG_MODULE_UNLOAD
@ 2012-01-16  0:32 Olof Johansson
  2012-01-16 11:32 ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2012-01-16  0:32 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Kay Sievers, linux-kernel, Olof Johansson

Looks like the "module_flags_taint" helper was added under an #ifdef
CONFIG_MODULE_UNLOAD block, move it out of it.

Fixes:

kernel/module.c: In function 'show_taint':
kernel/module.c:1024:2: error: implicit declaration of function 'module_flags_taint'

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 kernel/module.c |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index acf6ed3..2c93276 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -842,26 +842,6 @@ out:
 	return ret;
 }
 
-static size_t module_flags_taint(struct module *mod, char *buf)
-{
-	size_t l = 0;
-
-	if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE))
-		buf[l++] = 'P';
-	if (mod->taints & (1 << TAINT_OOT_MODULE))
-		buf[l++] = 'O';
-	if (mod->taints & (1 << TAINT_FORCED_MODULE))
-		buf[l++] = 'F';
-	if (mod->taints & (1 << TAINT_CRAP))
-		buf[l++] = 'C';
-	/*
-	 * TAINT_FORCED_RMMOD: could be added.
-	 * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
-	 * apply to modules.
-	 */
-	return l;
-}
-
 static inline void print_unload_info(struct seq_file *m, struct module *mod)
 {
 	struct module_use *use;
@@ -962,6 +942,26 @@ static inline int module_unload_init(struct module *mod)
 }
 #endif /* CONFIG_MODULE_UNLOAD */
 
+static size_t module_flags_taint(struct module *mod, char *buf)
+{
+	size_t l = 0;
+
+	if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE))
+		buf[l++] = 'P';
+	if (mod->taints & (1 << TAINT_OOT_MODULE))
+		buf[l++] = 'O';
+	if (mod->taints & (1 << TAINT_FORCED_MODULE))
+		buf[l++] = 'F';
+	if (mod->taints & (1 << TAINT_CRAP))
+		buf[l++] = 'C';
+	/*
+	 * TAINT_FORCED_RMMOD: could be added.
+	 * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
+	 * apply to modules.
+	 */
+	return l;
+}
+
 static ssize_t show_initstate(struct module_attribute *mattr,
 			      struct module_kobject *mk, char *buffer)
 {
-- 
1.7.8.GIT


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] modules: fix build error with !CONFIG_MODULE_UNLOAD
  2012-01-16  0:32 [PATCH] modules: fix build error with !CONFIG_MODULE_UNLOAD Olof Johansson
@ 2012-01-16 11:32 ` Rusty Russell
  2012-01-17  6:23   ` Olof Johansson
  0 siblings, 1 reply; 4+ messages in thread
From: Rusty Russell @ 2012-01-16 11:32 UTC (permalink / raw)
  To: Olof Johansson; +Cc: Kay Sievers, linux-kernel, Olof Johansson

On Sun, 15 Jan 2012 16:32:23 -0800, Olof Johansson <olof@lixom.net> wrote:
> Looks like the "module_flags_taint" helper was added under an #ifdef
> CONFIG_MODULE_UNLOAD block, move it out of it.
> 
> Fixes:
> 
> kernel/module.c: In function 'show_taint':
> kernel/module.c:1024:2: error: implicit declaration of function 'module_flags_taint'
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>

Applied.

Thanks,
Rusty.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] modules: fix build error with !CONFIG_MODULE_UNLOAD
  2012-01-16 11:32 ` Rusty Russell
@ 2012-01-17  6:23   ` Olof Johansson
  2012-01-18  2:56     ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2012-01-17  6:23 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Kay Sievers, linux-kernel

On Mon, Jan 16, 2012 at 3:32 AM, Rusty Russell <rusty@rustcorp.com.au> wrote:
> On Sun, 15 Jan 2012 16:32:23 -0800, Olof Johansson <olof@lixom.net> wrote:
>> Looks like the "module_flags_taint" helper was added under an #ifdef
>> CONFIG_MODULE_UNLOAD block, move it out of it.
>>
>> Fixes:
>>
>> kernel/module.c: In function 'show_taint':
>> kernel/module.c:1024:2: error: implicit declaration of function 'module_flags_taint'
>>
>> Signed-off-by: Olof Johansson <olof@lixom.net>
>
> Applied.


It looks like Linus already took an equivalent patch (shortly after I
had sent mine). You can drop it to avoid conflicts.


Thanks!

-Olof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] modules: fix build error with !CONFIG_MODULE_UNLOAD
  2012-01-17  6:23   ` Olof Johansson
@ 2012-01-18  2:56     ` Rusty Russell
  0 siblings, 0 replies; 4+ messages in thread
From: Rusty Russell @ 2012-01-18  2:56 UTC (permalink / raw)
  To: Olof Johansson; +Cc: Kay Sievers, linux-kernel

On Mon, 16 Jan 2012 22:23:32 -0800, Olof Johansson <olof@lixom.net> wrote:
> On Mon, Jan 16, 2012 at 3:32 AM, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > On Sun, 15 Jan 2012 16:32:23 -0800, Olof Johansson <olof@lixom.net> wrote:
> >> Looks like the "module_flags_taint" helper was added under an #ifdef
> >> CONFIG_MODULE_UNLOAD block, move it out of it.
> >>
> >> Fixes:
> >>
> >> kernel/module.c: In function 'show_taint':
> >> kernel/module.c:1024:2: error: implicit declaration of function 'module_flags_taint'
> >>
> >> Signed-off-by: Olof Johansson <olof@lixom.net>
> >
> > Applied.
> 
> 
> It looks like Linus already took an equivalent patch (shortly after I
> had sent mine). You can drop it to avoid conflicts.

Indeed, I dropped it when I re-synced.

Thanks,
Rusty.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-18  3:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-16  0:32 [PATCH] modules: fix build error with !CONFIG_MODULE_UNLOAD Olof Johansson
2012-01-16 11:32 ` Rusty Russell
2012-01-17  6:23   ` Olof Johansson
2012-01-18  2:56     ` Rusty Russell

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).