Skip to contentSkip to conversation

powerpc/spufs: Fix duplicate definition of MAX_USER_PRIO

PATCH New Peter Zijlstra 1 participant 1 message Feb 11, 2014 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 52f92761.nu9w3QblrTnGpeYg%[email protected]

#1 lore raw

PATCH 1/1 powerpc/spufs: Fix duplicate definition of MAX_USER_PRIO

Quoted 8 lines · kbuild test robot
Quoted 1 line
Quoted 1 line

arch/powerpc/platforms/cell/spufs/sched.c:86:0: warning: "MAX_USER_PRIO" redefined [enabled by default]

    #define MAX_USER_PRIO  (MAX_PRIO - MAX_RT_PRIO)
    ^
   In file included from include/linux/sched.h:6:0,
                    from arch/powerpc/platforms/cell/spufs/sched.c:26:
   include/linux/sched/prio.h:39:0: note: this is the location of the previous definition
    #define MAX_USER_PRIO  (USER_PRIO(MAX_PRIO))
    ^

Since USER_PRIO(p) is ((p)-MAX_RT_PRIO) the above two definitions are the same and we can simply remove the spufs one.

Fixes 6b6350f155af ("sched: Expose some macros related to priority")
---
 arch/powerpc/platforms/cell/spufs/sched.c | 1 -
 1 file changed, 1 deletion(-)
arch/powerpc/platforms/cell/spufs/sched.c +0 -1
index 49318385d4fa..4a0a64fe25df 100644
@@ -83,7 +83,6 @@ static struct timer_list spuloadavg_timer;
 #define MIN_SPU_TIMESLICE	max(5 * HZ / (1000 * SPUSCHED_TICK), 1)
 #define DEF_SPU_TIMESLICE	(100 * HZ / (1000 * SPUSCHED_TICK))
 
-#define MAX_USER_PRIO		(MAX_PRIO - MAX_RT_PRIO)
 #define SCALE_PRIO(x, prio) \
 	max(x * (MAX_PRIO - prio) / (MAX_USER_PRIO / 2), MIN_SPU_TIMESLICE)