[U-Boot] [PATCH v1 05/25] spi: kirkwood_spi.c: cosmetic: Fix minor coding style issues

Jagan Teki jagannadh.teki at gmail.com
Thu Jul 3 22:18:35 CEST 2014


Reviewed-by: Jagannadha Sutradharudu Teki <jaganna at xilinx.com>

On Fri, Jun 27, 2014 at 3:24 PM, Stefan Roese <sr at denx.de> wrote:
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Jagannadha Sutradharudu Teki <jaganna at xilinx.com>
> ---
>
>  drivers/spi/kirkwood_spi.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c
> index 7d1c1f9..3d58bcc 100644
> --- a/drivers/spi/kirkwood_spi.c
> +++ b/drivers/spi/kirkwood_spi.c
> @@ -46,7 +46,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
>
>         /* program spi clock prescaller using max_hz */
>         writel(KWSPI_ADRLEN_3BYTE | data, &spireg->cfg);
> -       debug("data = 0x%08x \n", data);
> +       debug("data = 0x%08x\n", data);
>
>         writel(KWSPI_SMEMRDIRQ, &spireg->irq_cause);
>         writel(KWSPI_IRQMASK, &spireg->irq_mask);
> @@ -100,7 +100,6 @@ int spi_claim_bus(struct spi_slave *slave)
>
>         /* set new spi mpp and save current mpp config */
>         kirkwood_mpp_conf(spi_mpp_config, spi_mpp_backup);
> -
>  #endif
>
>         return board_spi_claim_bus(slave);
> @@ -127,7 +126,7 @@ void spi_release_bus(struct spi_slave *slave)
>   */
>  int spi_cs_is_valid(unsigned int bus, unsigned int cs)
>  {
> -       return (bus == 0 && (cs == 0 || cs == 1));
> +       return bus == 0 && (cs == 0 || cs == 1);
>  }
>  #endif
>
> @@ -169,7 +168,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
>
>                 /* Shift data so it's msb-justified */
>                 if (dout)
> -                       tmpdout = *(u32 *) dout & 0x0ff;
> +                       tmpdout = *(u32 *)dout & 0xff;
>
>                 clrbits_le32(&spireg->irq_cause, KWSPI_SMEMRDIRQ);
>                 writel(tmpdout, &spireg->dout); /* Write the data out */
> @@ -185,12 +184,11 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
>                         if (readl(&spireg->irq_cause) & KWSPI_SMEMRDIRQ) {
>                                 isread = 1;
>                                 tmpdin = readl(&spireg->din);
> -                               debug
> -                                       ("spi_xfer: din %p..%08x read\n",
> -                                       din, tmpdin);
> +                               debug("spi_xfer: din %p..%08x read\n",
> +                                     din, tmpdin);
>
>                                 if (din) {
> -                                       *((u8 *) din) = (u8) tmpdin;
> +                                       *((u8 *)din) = (u8)tmpdin;
>                                         din += 1;
>                                 }
>                                 if (dout)
> --
> 2.0.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



-- 
Jagan.


More information about the U-Boot mailing list