From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v6 03/23] spi: altera_spi: Use BIT macro
Date: Wed, 28 Oct 2015 15:14:28 +0800 [thread overview]
Message-ID: <563075D4.7050401@wytron.com.tw> (raw)
In-Reply-To: <1445968032-11105-1-git-send-email-jteki@openedev.com>
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@denx.de>
> Cc: Thomas Chou <thomas@wytron.com.tw>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Jagan Teki <jteki@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@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)
> {
>
prev parent reply other threads:[~2015-10-28 7:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 17:47 [U-Boot] [PATCH v6 03/23] spi: altera_spi: Use BIT macro Jagan Teki
2015-10-27 17:47 ` [U-Boot] [PATCH] spi: altera_spi: Minor cleanup Jagan Teki
2015-10-28 7:14 ` Thomas Chou
2015-10-28 7:14 ` Thomas Chou [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563075D4.7050401@wytron.com.tw \
--to=thomas@wytron.com.tw \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox