mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Matthew Wilcox <matthew@wil.cx>
Cc: Adrian Bunk <bunk@stusta.de>, Andrew Morton <akpm@osdl.org>,
	Sukadev Bhattiprolu <sukadev@us.ibm.com>,
	linux-kernel@vger.kernel.org, parisc-linux@parisc-linux.org
Subject: [PATCH] Fix conflict with the is_init identifier on parisc
Date: Mon, 04 Sep 2006 12:24:27 -0600	[thread overview]
Message-ID: <m164g37an8.fsf_-_@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20060904134826.GF2558@parisc-linux.org> (Matthew Wilcox's message of "Mon, 4 Sep 2006 07:48:27 -0600")

Matthew Wilcox <matthew@wil.cx> writes:

> On Mon, Sep 04, 2006 at 01:41:30PM +0200, Adrian Bunk wrote:
>> pidspace-is_init.patch causes the following compile error on parisc:
>> 
>> <--  snip  -->
>> 
>> ...
>>   CC      arch/parisc/kernel/module.o
>>
> /home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/arch/parisc/kernel/module.c:76:
> error: conflicting types for 'is_init'
>> /home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/include/linux/sched.h:1090:
> error: previous definition of 'is_init' was here
>> make[2]: *** [arch/parisc/kernel/module.o] Error 1
>> 
>> <--  snip  -->
>
> Looks like ia64 calls the same function in_init().  I'm tempted to
> change parisc to have the same name.

How does the following patch look?
Since I don't have a parisc compiler so I haven't compile tested it.
But it is a simple substitute and replace and I can't see any problems
by inspection so it should work.

----

This appears to be the only usage of is_init in the kernel
besides the usage in sched.h.   On ia64 the same function is
called in_init.    So to remove the conflict and make the kernel
more consistent rename is_init is_core is_local and is_local_section
to in_init in_core in_local and in_local_section respectively.

Thanks to Adrian Bunk who spotted this, and to Matthew Wilcox
who suggested this fix.

Singed-off-by: Eric Biederman <ebiederm@xmission.com>
---
 arch/parisc/kernel/module.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index aee3118..f50b982 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -27,7 +27,7 @@
  *    - SEGREL32 handling
  *      We are not doing SEGREL32 handling correctly. According to the ABI, we
  *      should do a value offset, like this:
- *			if (is_init(me, (void *)val))
+ *			if (in_init(me, (void *)val))
  *				val -= (uint32_t)me->module_init;
  *			else
  *				val -= (uint32_t)me->module_core;
@@ -72,27 +72,27 @@ #define MAX_GOTS	1023
 
 /* three functions to determine where in the module core
  * or init pieces the location is */
-static inline int is_init(struct module *me, void *loc)
+static inline int in_init(struct module *me, void *loc)
 {
 	return (loc >= me->module_init &&
 		loc <= (me->module_init + me->init_size));
 }
 
-static inline int is_core(struct module *me, void *loc)
+static inline int in_core(struct module *me, void *loc)
 {
 	return (loc >= me->module_core &&
 		loc <= (me->module_core + me->core_size));
 }
 
-static inline int is_local(struct module *me, void *loc)
+static inline int in_local(struct module *me, void *loc)
 {
-	return is_init(me, loc) || is_core(me, loc);
+	return in_init(me, loc) || in_core(me, loc);
 }
 
-static inline int is_local_section(struct module *me, void *loc, void *dot)
+static inline int in_local_section(struct module *me, void *loc, void *dot)
 {
-	return (is_init(me, loc) && is_init(me, dot)) ||
-		(is_core(me, loc) && is_core(me, dot));
+	return (in_init(me, loc) && in_init(me, dot)) ||
+		(in_core(me, loc) && in_core(me, dot));
 }
 
 
@@ -566,14 +566,14 @@ #endif
 			break;
 		case R_PARISC_PCREL17F:
 			/* 17-bit PC relative address */
-			val = get_stub(me, val, addend, ELF_STUB_GOT, is_init(me, loc));
+			val = get_stub(me, val, addend, ELF_STUB_GOT, in_init(me, loc));
 			val = (val - dot - 8)/4;
 			CHECK_RELOC(val, 17)
 			*loc = (*loc & ~0x1f1ffd) | reassemble_17(val);
 			break;
 		case R_PARISC_PCREL22F:
 			/* 22-bit PC relative address; only defined for pa20 */
-			val = get_stub(me, val, addend, ELF_STUB_GOT, is_init(me, loc));
+			val = get_stub(me, val, addend, ELF_STUB_GOT, in_init(me, loc));
 			DEBUGP("STUB FOR %s loc %lx+%lx at %lx\n", 
 			       strtab + sym->st_name, (unsigned long)loc, addend, 
 			       val)
@@ -670,9 +670,9 @@ #endif
 			       strtab + sym->st_name,
 			       loc, val);
 			/* can we reach it locally? */
-			if(!is_local_section(me, (void *)val, (void *)dot)) {
+			if(!in_local_section(me, (void *)val, (void *)dot)) {
 
-				if (is_local(me, (void *)val))
+				if (in_local(me, (void *)val))
 					/* this is the case where the
 					 * symbol is local to the
 					 * module, but in a different
@@ -680,14 +680,14 @@ #endif
 					 * in case it's more than 22
 					 * bits away */
 					val = get_stub(me, val, addend, ELF_STUB_DIRECT,
-						       is_init(me, loc));
+						       in_init(me, loc));
 				else if (strncmp(strtab + sym->st_name, "$$", 2)
 				    == 0)
 					val = get_stub(me, val, addend, ELF_STUB_MILLI,
-						       is_init(me, loc));
+						       in_init(me, loc));
 				else
 					val = get_stub(me, val, addend, ELF_STUB_GOT,
-						       is_init(me, loc));
+						       in_init(me, loc));
 			}
 			DEBUGP("STUB FOR %s loc %lx, val %lx+%lx at %lx\n", 
 			       strtab + sym->st_name, loc, sym->st_value,
@@ -720,7 +720,7 @@ #endif
 			break;
 		case R_PARISC_FPTR64:
 			/* 64-bit function address */
-			if(is_local(me, (void *)(val + addend))) {
+			if(in_local(me, (void *)(val + addend))) {
 				*loc64 = get_fdesc(me, val+addend);
 				DEBUGP("FDESC for %s at %p points to %lx\n",
 				       strtab + sym->st_name, *loc64,
-- 
1.4.2.rc3.g7e18e-dirty


  reply	other threads:[~2006-09-04 18:25 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-01  8:58 2.6.18-rc5-mm1 Andrew Morton
2006-09-01  9:53 ` 2.6.18-rc5-mm1 Manuel Lauss
2006-09-01 10:44 ` 2.6.18-rc5-mm1 Grant Wilson
2006-09-01 13:50   ` [-mm patch] drivers/md/Kconfig: fix BLOCK dependency Adrian Bunk
2006-09-01 14:15   ` David Howells
2006-09-01 14:26     ` Jens Axboe
2006-09-01 16:00 ` 2.6.18-rc5-mm1: drivers/infiniband/hw/amso1100/c2.c compile error Adrian Bunk
2006-09-01 17:13   ` Andrew Morton
2006-09-01 17:34     ` Roland Dreier
2006-09-01 18:23       ` Andrew Morton
2006-09-01 19:53         ` Roland Dreier
2006-09-01 20:04           ` Andrew Morton
2006-09-01 20:20             ` Tom Tucker
2006-09-01 20:43             ` Russell King
2006-09-01 20:54               ` Roland Dreier
2006-09-01 21:01                 ` [openib-general] " Bryan O'Sullivan
2006-09-01 20:59               ` Andrew Morton
2006-09-01 21:05                 ` Roland Dreier
2006-09-01 21:26                   ` Andrew Morton
2006-09-01 22:42                     ` Roland Dreier
2006-09-01 20:51             ` Roland Dreier
2006-09-01 21:03               ` Andrew Morton
2006-09-01 20:45           ` [openib-general] " Bryan O'Sullivan
2006-09-01 20:59             ` Roland Dreier
2006-09-01 21:03               ` Bryan O'Sullivan
2006-09-01 16:40 ` 2.6.18-rc5-mm1 Maciej Rutecki
2006-09-05 16:16   ` 2.6.18-rc5-mm1 Bjorn Helgaas
2006-09-06 16:55     ` 2.6.18-rc5-mm1 Maciej Rutecki
2006-09-07  3:08       ` 2.6.18-rc5-mm1 Andrew Morton
2006-09-07 17:33         ` 2.6.18-rc5-mm1 keith mannthey
2006-09-01 19:58 ` [-mm patch] fs/reiser4/: possible cleanups Adrian Bunk
2006-09-01 23:13 ` 2.6.18-rc5-mm1 (IDE resume regression) Rafael J. Wysocki
2006-09-02  0:08   ` Andrew Morton
2006-09-02  1:00 ` 2.6.18-rc5-mm1 Matthias Hentges
2006-09-02  1:30   ` 2.6.18-rc5-mm1 Andrew Morton
     [not found]     ` <44F93EB3.8050500@goop.org>
2006-09-02  8:37       ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-02  8:44         ` 2.6.18-rc5-mm1 Greg KH
2006-09-02  8:47           ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-02  8:52             ` 2.6.18-rc5-mm1 Greg KH
2006-09-02  9:36               ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-02  9:38                 ` 2.6.18-rc5-mm1 Jeff Garzik
2006-09-02  9:47                   ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-02  9:56                   ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-09 23:47           ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-10 16:24             ` 2.6.18-rc5-mm1 Matthias Hentges
2006-09-02  1:06 ` 2.6.18-rc5-mm1 Grant Coady
2006-09-02  1:12   ` 2.6.18-rc5-mm1 Dmitry Torokhov
2006-09-02  1:33     ` 2.6.18-rc5-mm1 Dmitry Torokhov
2006-09-02  2:10     ` 2.6.18-rc5-mm1 Grant Coady
2006-09-02  1:39   ` 2.6.18-rc5-mm1 Andrew Morton
2006-09-02  3:51     ` 2.6.18-rc5-mm1 Grant Coady
2006-09-02 20:20       ` 2.6.18-rc5-mm1 Grant Coady
2006-09-02 20:38         ` "VGER BF report:.." ? Matti Aarnio
2006-09-03 15:06           ` Jan Engelhardt
2006-09-03 19:59             ` Grant Coady
2006-09-02  9:05 ` 2.6.18-rc5-mm1 Philippe Gramoullé
2006-09-02 11:40   ` 2.6.18-rc5-mm1 Stefan Richter
2006-09-02 11:51     ` 2.6.18-rc5-mm1 Philippe Gramoullé
2006-09-03  9:09 ` [2.6.18-rc5-mm1 ACPI] Unknown exception code: 0xFFFFFFEA Mike Galbraith
2006-09-05 16:18   ` Bjorn Helgaas
2006-09-03 17:25 ` 2.6.18-rc5-mm1: sysfs_init() related compile error Adrian Bunk
2006-09-03 22:17 ` 2.6.18-rc5-mm1: MMU=n " Adrian Bunk
2006-09-04  7:44   ` Peter Zijlstra
2006-09-04 15:44     ` Adrian Bunk
2006-09-03 23:34 ` Lost DVD-RW [Was Re: 2.6.18-rc5-mm1] J.A. Magallón
2006-09-04  1:12   ` Andrew Morton
2006-09-04  2:42     ` Tejun Heo
2006-09-04 22:26       ` J.A. Magallón
2006-09-07  9:34         ` Tejun Heo
2006-09-07 11:13           ` J.A. Magallón
2006-09-07 11:32             ` [PATCH libata-dev#upstream-fixes] libata: ignore CFA signature while sanity-checking an ATAPI device Tejun Heo
2006-09-07 20:27               ` Andrew Morton
2006-09-07 21:03                 ` Jeff Garzik
2006-09-08  7:56                   ` Tejun Heo
2006-09-09 14:46           ` Lost DVD-RW [Was Re: 2.6.18-rc5-mm1] Alan Cox
2006-09-04 11:41 ` 2.6.18-rc5-mm1: is_init() parisc compile error Adrian Bunk
2006-09-04 13:48   ` [parisc-linux] " Matthew Wilcox
2006-09-04 18:24     ` Eric W. Biederman [this message]
2006-09-04 18:41       ` [PATCH] Fix conflict with the is_init identifier on parisc Adrian Bunk
2006-09-04 19:18       ` Andrew Morton
2006-09-04 17:03 ` [-mm patch] drivers/infiniband/hw/amso1100/: possible cleanups Adrian Bunk
2006-09-04 17:03 ` [-mm patch] make fs/lockd/host.c:nlm_lookup_host() static Adrian Bunk
2006-09-04 17:04 ` 2.6.18-rc5-mm1: ARCH_DISCONTIGMEM_ENABLE=y, SMP=n compile error Adrian Bunk
2006-09-04 19:04   ` Andrew Morton
2006-09-04 19:24     ` Adrian Bunk
2006-09-04 17:04 ` [-mm patch] fix kernel_execve() related compile errors Adrian Bunk
2006-09-04 17:04 ` [-mm patch] lib/ioremap.c must #include <linux/mm.h> Adrian Bunk
2006-09-04 18:41 ` [-mm patch] mm/memory_hotplug.c must #include <linux/cpuset.h> Adrian Bunk
2006-09-04 22:17 ` [-mm patch] arch/m68knommu/kernel/sys_m68k.c must #include <asm/unistd.h> Adrian Bunk
2006-09-05 13:03 ` lockdep oddity Heiko Carstens
2006-09-05 18:12   ` Ingo Molnar
2006-09-05 18:57     ` Hua Zhong
2006-09-05 18:52       ` Ingo Molnar
2006-09-05 19:08     ` Ingo Molnar
2006-09-05 19:37       ` Ingo Molnar
2006-09-06  6:54         ` Heiko Carstens
2006-09-06 10:05           ` Ingo Molnar
2006-09-06  7:20     ` Heiko Carstens
2006-09-06  7:47       ` Andrew Morton
2006-09-06  8:01         ` Heiko Carstens
2006-09-06  8:23           ` Hua Zhong
2006-09-06  8:40             ` Ingo Molnar
2006-09-06 14:19               ` Daniel Walker
2006-09-06 14:29                 ` Heiko Carstens
2006-09-06 14:34                   ` Daniel Walker
2006-09-05 20:07   ` Daniel Walker
2006-09-06  7:18     ` Heiko Carstens
2006-09-06 11:58     ` Heiko Carstens
2006-09-05 13:25 ` 2.6.18-rc5-mm1: {dis,en}able_irq_lockdep_irqrestore compile error Adrian Bunk
2006-09-05 15:21 ` [PATCH] FRV: Fix " David Howells
2006-09-06 12:50   ` Ingo Molnar
2006-09-05 15:27 ` [PATCH] NOMMU: Move the fallback arch_vma_name() to a sensible place David Howells
2006-09-05 15:29 ` [PATCH] NOMMU: Provide page_mkclean() for NOMMU David Howells
2006-09-05 15:31 ` [PATCH] NOMMU: Make lib/ioremap.c conditional David Howells
2006-09-05 15:35 ` [PATCH] FRV: do_gettimeofday() should no longer use tickadj David Howells
2006-09-06  1:46   ` john stultz
2006-09-06  9:27   ` David Howells
2006-09-06  9:43     ` Ingo Molnar
2006-09-06 12:30     ` David Howells
2006-09-06 12:56       ` Ingo Molnar
2006-09-06 14:46       ` David Howells
2006-09-06 23:01         ` Benjamin Herrenschmidt
2006-09-07  9:55         ` David Howells
2006-09-07 10:26           ` Ingo Molnar
2006-09-07 13:34           ` David Howells
2006-09-07 22:53           ` Benjamin Herrenschmidt
2006-09-08 10:25           ` David Howells
2006-09-08 11:05             ` Benjamin Herrenschmidt
2006-09-08 12:24             ` David Howells
2006-09-08 12:29           ` David Howells
2006-09-11  4:06             ` Benjamin Herrenschmidt
2006-09-09  5:46         ` Ingo Molnar
2006-09-11 10:46         ` David Howells
2006-09-05 16:00 ` 2.6.18-rc5-mm1 dependency on curses devel still there Steve Fox
2006-09-06 23:06 ` [-mm patch] ATA_JMICRON: remove the superfluous ATA dependency Adrian Bunk
2006-09-06 23:07 ` [-mm patch] ACPI_SONY shouldn't default m Adrian Bunk
2006-09-07  3:30   ` Andrew Morton
2006-09-07  4:41     ` Randy.Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m164g37an8.fsf_-_@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=parisc-linux@parisc-linux.org \
    --cc=sukadev@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome