[U-Boot] [PATCH 2/3] net: sh-eth: Fix coding style

Nobuhiro Iwamatsu iwamatsu at nigauri.org
Fri Jun 6 04:44:05 CEST 2014


ping.

2014-01-23 7:52 GMT+09:00 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>:
> This fixes checkpatch's warning.
>
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
> ---
>  drivers/net/sh_eth.c | 35 ++++++++++++++++++-----------------
>  drivers/net/sh_eth.h |  9 ++++-----
>  2 files changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
> index 0cb963f..81e8ddb 100644
> --- a/drivers/net/sh_eth.c
> +++ b/drivers/net/sh_eth.c
> @@ -67,7 +67,8 @@ int sh_eth_send(struct eth_device *dev, void *packet, int len)
>
>         /* packet must be a 4 byte boundary */
>         if ((int)packet & 3) {
> -               printf(SHETHER_NAME ": %s: packet not 4 byte alligned\n", __func__);
> +               printf(SHETHER_NAME ": %s: packet not 4 byte alligned\n"
> +                               , __func__);
>                 ret = -EFAULT;
>                 goto err;
>         }
> @@ -156,7 +157,7 @@ static int sh_eth_reset(struct sh_eth_dev *eth)
>
>         /* Perform a software reset and wait for it to complete */
>         sh_eth_write(eth, EDMR_SRST, EDMR);
> -       for (i = 0; i < TIMEOUT_CNT ; i++) {
> +       for (i = 0; i < TIMEOUT_CNT; i++) {
>                 if (!(sh_eth_read(eth, EDMR) & EDMR_SRST))
>                         break;
>                 udelay(1000);
> @@ -523,41 +524,41 @@ void sh_eth_halt(struct eth_device *dev)
>
>  int sh_eth_initialize(bd_t *bd)
>  {
> -    int ret = 0;
> +       int ret = 0;
>         struct sh_eth_dev *eth = NULL;
> -    struct eth_device *dev = NULL;
> +       struct eth_device *dev = NULL;
>
> -    eth = (struct sh_eth_dev *)malloc(sizeof(struct sh_eth_dev));
> +       eth = (struct sh_eth_dev *)malloc(sizeof(struct sh_eth_dev));
>         if (!eth) {
>                 printf(SHETHER_NAME ": %s: malloc failed\n", __func__);
>                 ret = -ENOMEM;
>                 goto err;
>         }
>
> -    dev = (struct eth_device *)malloc(sizeof(struct eth_device));
> +       dev = (struct eth_device *)malloc(sizeof(struct eth_device));
>         if (!dev) {
>                 printf(SHETHER_NAME ": %s: malloc failed\n", __func__);
>                 ret = -ENOMEM;
>                 goto err;
>         }
> -    memset(dev, 0, sizeof(struct eth_device));
> -    memset(eth, 0, sizeof(struct sh_eth_dev));
> +       memset(dev, 0, sizeof(struct eth_device));
> +       memset(eth, 0, sizeof(struct sh_eth_dev));
>
>         eth->port = CONFIG_SH_ETHER_USE_PORT;
>         eth->port_info[eth->port].phy_addr = CONFIG_SH_ETHER_PHY_ADDR;
>
> -    dev->priv = (void *)eth;
> -    dev->iobase = 0;
> -    dev->init = sh_eth_init;
> -    dev->halt = sh_eth_halt;
> -    dev->send = sh_eth_send;
> -    dev->recv = sh_eth_recv;
> -    eth->port_info[eth->port].dev = dev;
> +       dev->priv = (void *)eth;
> +       dev->iobase = 0;
> +       dev->init = sh_eth_init;
> +       dev->halt = sh_eth_halt;
> +       dev->send = sh_eth_send;
> +       dev->recv = sh_eth_recv;
> +       eth->port_info[eth->port].dev = dev;
>
>         sprintf(dev->name, SHETHER_NAME);
>
> -    /* Register Device to EtherNet subsystem  */
> -    eth_register(dev);
> +       /* Register Device to EtherNet subsystem  */
> +       eth_register(dev);
>
>         bb_miiphy_buses[0].priv = eth;
>         miiphy_register(dev->name, bb_miiphy_read, bb_miiphy_write);
> diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h
> index 0925759..2909659 100644
> --- a/drivers/net/sh_eth.h
> +++ b/drivers/net/sh_eth.h
> @@ -452,7 +452,6 @@ enum PHY_STATUS_BIT { PHY_ST_LINK = 0x01, };
>
>  /* EESR */
>  enum EESR_BIT {
> -
>  #if defined(SH_ETH_TYPE_ETHER)
>         EESR_TWB  = 0x40000000,
>  #else
> @@ -560,8 +559,8 @@ enum RECV_RST_BIT { RMCR_RST = 0x01, };
>  /* ECMR */
>  enum FELIC_MODE_BIT {
>  #if defined(SH_ETH_TYPE_GETHER) || defined(SH_ETH_TYPE_RZ)
> -       ECMR_TRCCM=0x04000000, ECMR_RCSC= 0x00800000, ECMR_DPAD= 0x00200000,
> -       ECMR_RZPF = 0x00100000,
> +       ECMR_TRCCM = 0x04000000, ECMR_RCSC = 0x00800000,
> +       ECMR_DPAD = 0x00200000, ECMR_RZPF = 0x00100000,
>  #endif
>         ECMR_ZPF = 0x00080000, ECMR_PFR = 0x00040000, ECMR_RXF = 0x00020000,
>         ECMR_TXF = 0x00010000, ECMR_MCT = 0x00002000, ECMR_PRCEF = 0x00001000,
> @@ -577,8 +576,8 @@ enum FELIC_MODE_BIT {
>  };
>
>  #if defined(SH_ETH_TYPE_GETHER) || defined(SH_ETH_TYPE_RZ)
> -#define ECMR_CHG_DM    (ECMR_TRCCM | ECMR_RZPF | ECMR_ZPF | ECMR_PFR | ECMR_RXF | \
> -                                               ECMR_TXF | ECMR_MCT)
> +#define ECMR_CHG_DM (ECMR_TRCCM | ECMR_RZPF | ECMR_ZPF | ECMR_PFR | \
> +                       ECMR_RXF | ECMR_TXF | ECMR_MCT)
>  #elif defined(SH_ETH_TYPE_ETHER)
>  #define ECMR_CHG_DM (ECMR_ZPF | ECMR_PFR | ECMR_RXF | ECMR_TXF)
>  #else
> --
> 1.8.5
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6


More information about the U-Boot mailing list