Message ID | e7070aa53c0f304fdd263a7dc5d7b897b77b7ec9.1521215903.git.christophe.leroy@c-s.fr |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
Series | Powerpc: mpc8xx: cleanup before migration to DM model | expand |
On Fri, Mar 16, 2018 at 05:20:37PM +0100, Christophe Leroy wrote: > SPRN_IMMR is defined regardless of the CPU. Therefore, there > is no point in enclosing get_immr() inside a #ifdef CONFIG_8xx > > As it a static inline function, it will in any case only be > compiled in functons using it. > > Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Applied to u-boot/master, thanks!
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h index 5e0aa08be93..6ba10974b6d 100644 --- a/arch/powerpc/include/asm/ppc.h +++ b/arch/powerpc/include/asm/ppc.h @@ -40,14 +40,13 @@ #include <asm/processor.h> -#if defined(CONFIG_8xx) static inline uint get_immr(uint mask) { uint immr = mfspr(SPRN_IMMR); return mask ? (immr & mask) : immr; } -#endif + static inline uint get_pvr(void) { return mfspr(PVR);
SPRN_IMMR is defined regardless of the CPU. Therefore, there is no point in enclosing get_immr() inside a #ifdef CONFIG_8xx As it a static inline function, it will in any case only be compiled in functons using it. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> --- arch/powerpc/include/asm/ppc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)