[U-Boot] [PATCH v6 03/23] spi: altera_spi: Use BIT macro

Thomas Chou thomas at wytron.com.tw
Wed Oct 28 08:14:28 CET 2015


HI Jagan,

On 10/28/2015 01:47 AM, Jagan Teki wrote:
> Replace numerical bit shift with BIT macro
> in altera_spi
>
> :%s/(1 << nr)/BIT(nr)/g
> where nr = 0, 1, 2 .... 31
>
> Cc: Marek Vasut <marex at denx.de>
> Cc: Thomas Chou <thomas at wytron.com.tw>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> Signed-off-by: Jagan Teki <jteki at openedev.com>
> ---
> Changes for v6:
> 	- Rebase to master
>
>   drivers/spi/altera_spi.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>

Acked-by: Thomas Chou <thomas at wytron.com.tw>

Thanks a lot.

Best regards,
Thomas Chou

> diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
> index ff3512a..3dbcfaa 100644
> --- a/drivers/spi/altera_spi.c
> +++ b/drivers/spi/altera_spi.c
> @@ -38,8 +38,8 @@ struct altera_spi_priv {
>   	struct altera_spi_regs *regs;
>   };
>
> -#define ALTERA_SPI_STATUS_RRDY_MSK	(1 << 7)
> -#define ALTERA_SPI_CONTROL_SSO_MSK	(1 << 10)
> +#define ALTERA_SPI_STATUS_RRDY_MSK	BIT(7)
> +#define ALTERA_SPI_CONTROL_SSO_MSK	BIT(10)
>
>   static void spi_cs_activate(struct udevice *dev, uint cs)
>   {
>


More information about the U-Boot mailing list