[PATCH 1/3] powerpc/mpc512x: fix noderef sparse warnings
Kim Phillips
kim.phillips at freescale.com
Wed Feb 6 14:11:27 EST 2013
On Tue, 5 Feb 2013 08:20:16 +0100
Anatolij Gustschin <agust at denx.de> wrote:
> Fix:
> warning: dereference of noderef expression
>
> Signed-off-by: Anatolij Gustschin <agust at denx.de>
> ---
> arch/powerpc/platforms/512x/clock.c | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c
> index 7937361..8a784d4 100644
> --- a/arch/powerpc/platforms/512x/clock.c
> +++ b/arch/powerpc/platforms/512x/clock.c
> @@ -184,7 +184,7 @@ static unsigned long spmf_mult(void)
> 36, 40, 44, 48,
> 52, 56, 60, 64
> };
> - int spmf = (clockctl->spmr >> 24) & 0xf;
> + int spmf = (in_be32(&clockctl->spmr) >> 24) & 0xf;
power arch should start using the more portable i/o accessors
io{read,write}32be instead of the arch-centric {in,out}_be32. The
io{read,write}32be functions have better sparse annotation, so an
endian check will complain if registers are not defined __be32.
Kim
More information about the Linuxppc-dev
mailing list