[PATCH 1/7] POWERPC: Add cpm2 stuff support to the fsl_soc.c
Stephen Rothwell
sfr at canb.auug.org.au
Sat Sep 16 18:20:22 EST 2006
Hi Vitaly,
Just a few nits ...
On Fri, 15 Sep 2006 21:38:57 +0400 Vitaly Bordug <vbordug at ru.mvista.com> wrote:
>
> +#ifdef CONFIG_CPM2
> +#include <asm/cpm2.h>
> +#endif
We normally don't do conditional includes, the include file should
protect its contents (if that is necessary - it usually isn't).
> + unsigned int *prop = (unsigned int*)get_property(node, "brg-frequency", &size);
get_property returns "const void *" so no cast is necessary, but prop
should be declated "const unsigned int *".
> + unsigned int *prop = (unsigned int*)get_property(node, "current-speed", &size);
Ditto.
> +static const char *fcc_regs = "fcc_regs";
> +static const char *fcc_regs_c = "fcc_regs_c";
> +static const char *fcc_pram = "fcc_pram";
I think that these could be declared as const char [].
> + model = (char *)get_property(np, "model", NULL);
> + mac_addr = (void *)get_property(np, "mac-address", NULL);
> + ph = (phandle *) get_property(np, "phy-handle", NULL);
> + phy_addr = (u32 *) get_property(phy, "reg", NULL);
> + id = (u32 *) get_property(np, "device-id", NULL);
Same comments about const and void * with respect to get_property. There
are more ...
> +static const char *scc_regs = "regs";
> +static const char *scc_pram = "pram";
const char [] ?
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
More information about the Linuxppc-dev
mailing list