[U-Boot] [PATCH] net: sh_eth: Fix build warnings and whitespace for sh_eth

Mike Frysinger vapier at gentoo.org
Fri Feb 3 12:21:18 CET 2012


On Friday 03 February 2012 02:30:48 Nobuhiro Iwamatsu wrote:
> @@ -564,8 +569,10 @@ static int sh_eth_bb_init(struct bb_miiphy_bus *bus)
> 
>  static int sh_eth_bb_mdio_active(struct bb_miiphy_bus *bus)
>  {
> +	int port;
>  	struct sh_eth_dev *eth = bus->priv;
> -	int port = eth->port;
> +
> +	port = eth->port;
> 
>  	outl(inl(PIR(port)) | PIR_MMD, PIR(port));
> 
> @@ -574,8 +581,10 @@ static int sh_eth_bb_mdio_active(struct bb_miiphy_bus
> *bus)
> 
>  static int sh_eth_bb_mdio_tristate(struct bb_miiphy_bus *bus)
>  {
> +	int port;
>  	struct sh_eth_dev *eth = bus->priv;
> -	int port = eth->port;
> +
> +	port = eth->port;
> 
>  	outl(inl(PIR(port)) & ~PIR_MMD, PIR(port));
> 
> @@ -584,8 +593,10 @@ static int sh_eth_bb_mdio_tristate(struct
> bb_miiphy_bus *bus)
> 
>  static int sh_eth_bb_set_mdio(struct bb_miiphy_bus *bus, int v)
>  {
> +	int port;
>  	struct sh_eth_dev *eth = bus->priv;
> -	int port = eth->port;
> +
> +	port = eth->port;
> 
>  	if (v)
>  		outl(inl(PIR(port)) | PIR_MDO, PIR(port));
> @@ -597,8 +608,10 @@ static int sh_eth_bb_set_mdio(struct bb_miiphy_bus
> *bus, int v)
> 
>  static int sh_eth_bb_get_mdio(struct bb_miiphy_bus *bus, int *v)
>  {
> +	int port;
>  	struct sh_eth_dev *eth = bus->priv;
> -	int port = eth->port;
> +
> +	port = eth->port;
> 
>  	*v = (inl(PIR(port)) & PIR_MDI) >> 3;
> 
> @@ -607,8 +620,10 @@ static int sh_eth_bb_get_mdio(struct bb_miiphy_bus
> *bus, int *v)
> 
>  static int sh_eth_bb_set_mdc(struct bb_miiphy_bus *bus, int v)
>  {
> +	int port;
>  	struct sh_eth_dev *eth = bus->priv;
> -	int port = eth->port;
> +
> +	port = eth->port;
> 
>  	if (v)
>  		outl(inl(PIR(port)) | PIR_MDC, PIR(port));

i don't see why any of these changes are necessary ... the old code looks fine 
to me (from a warning and style pov)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120203/9e3c7869/attachment.pgp>


More information about the U-Boot mailing list