public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.23-rc: sched.c vs. xtensa: RSR redefined
@ 2007-09-01 15:27 Adrian Bunk
  2007-09-01 16:44 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2007-09-01 15:27 UTC (permalink / raw)
  To: Ingo Molnar, chris; +Cc: linux-kernel

Although it seems to pick the right version the following namespace 
conflict should be resolved:

<--  snip  -->

...
  CC      kernel/sched.o
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc4-mm1/kernel/sched.c:676:1: warning: "RSR" redefined
In file included from include2/asm/bitops.h:18,
                 from 
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc4-mm1/include/linux/bitops.h:17,
                 from 
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc4-mm1/include/linux/thread_info.h:20,
                 from 
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc4-mm1/include/linux/preempt.h:9,
                 from 
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc4-mm1/include/linux/spinlock.h:49,
                 from 
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc4-mm1/include/linux/mmzone.h:7,
                 from 
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc4-mm1/include/linux/gfp.h:4,
                 from 
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc4-mm1/include/linux/mm.h:8,
                 from 
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc4-mm1/kernel/sched.c:27:
include2/asm/processor.h:194:1: warning: this is the location of the previous definition
...

<--  snip  -->

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: 2.6.23-rc: sched.c vs. xtensa: RSR redefined
  2007-09-01 15:27 2.6.23-rc: sched.c vs. xtensa: RSR redefined Adrian Bunk
@ 2007-09-01 16:44 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2007-09-01 16:44 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: chris, linux-kernel


* Adrian Bunk <bunk@kernel.org> wrote:

> Although it seems to pick the right version the following namespace 
> conflict should be resolved:

agreed - i've queued up the fix below.

	Ingo

------------------>
Subject: sched: fix xtensa build warning
From: Ingo Molnar <mingo@elte.hu>

rename RSR to SRR - 'RSR' is already defined on xtensa.

found by Adrian Bunk.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/sched.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux/kernel/sched.c
===================================================================
--- linux.orig/kernel/sched.c
+++ linux/kernel/sched.c
@@ -668,7 +668,7 @@ static u64 div64_likely32(u64 divident, 
 /*
  * Shift right and round:
  */
-#define RSR(x, y) (((x) + (1UL << ((y) - 1))) >> (y))
+#define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y))
 
 static unsigned long
 calc_delta_mine(unsigned long delta_exec, unsigned long weight,
@@ -684,10 +684,10 @@ calc_delta_mine(unsigned long delta_exec
 	 * Check whether we'd overflow the 64-bit multiplication:
 	 */
 	if (unlikely(tmp > WMULT_CONST))
-		tmp = RSR(RSR(tmp, WMULT_SHIFT/2) * lw->inv_weight,
+		tmp = SRR(SRR(tmp, WMULT_SHIFT/2) * lw->inv_weight,
 			WMULT_SHIFT/2);
 	else
-		tmp = RSR(tmp * lw->inv_weight, WMULT_SHIFT);
+		tmp = SRR(tmp * lw->inv_weight, WMULT_SHIFT);
 
 	return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX);
 }

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

end of thread, other threads:[~2007-09-01 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-01 15:27 2.6.23-rc: sched.c vs. xtensa: RSR redefined Adrian Bunk
2007-09-01 16:44 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox