Skip to contentSkip to conversation

Mutex compilation error

PATCH New David Howells 2 participants 2 messages Jan 10, 2006

lore
Share & tools
lore
#0 lore raw

Hi Ingo,

I've found a compilation error in mutexes when using the null variety:

In file included from kernel/mutex-debug.c:25:
kernel/mutex-debug.h:23:1: warning: "__IP__" redefined
In file included from include/asm/mutex.h:9,
from kernel/mutex-debug.c:23:
include/asm-generic/mutex-null.h:15:1: warning: this is the location of the previous definition

It seems that mutex-null.h defined __IP__ before mutex-debug.h because in mutex-debug.c:

	#include <asm/mutex.h>

	#include "mutex-debug.h"

is the ordering of the includes.

Whilst mutex-null.h defends against multiple inclusions of __IP__, mutex-debug.h does not.

David

#1 lore raw

PATCH 1/1 remove unnecessary asm/mutex.h from kernel/mutex-debug.c

Quoted 7 lines · David Howells

I've found a compilation error in mutexes when using the null variety:

In file included from kernel/mutex-debug.c:25:
kernel/mutex-debug.h:23:1: warning: "__IP__" redefined
In file included from include/asm/mutex.h:9,
from kernel/mutex-debug.c:23:
include/asm-generic/mutex-null.h:15:1: warning: this is the location of the previous definition

ok, the patch below should solve this. This didnt trigger on any of the existing arches until now, because neither used asm-generic/null.h as their method. I build-tested the patch. Linus, please apply.

Ingo
--

remove unnecessary (and incorrect) inclusion of asm/mutex.h, pointed out by David Howells.

----

 kernel/mutex-debug.c |    2 --
 1 files changed, 2 deletions(-)
kernel/mutex-debug.c +0 -2
Index: linux/kernel/mutex-debug.c
===================================================================
@@ -20,8 +20,6 @@
 #include <linux/kallsyms.h>
 #include <linux/interrupt.h>
 
-#include <asm/mutex.h>
-
 #include "mutex-debug.h"
 
 /*