From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Tue, 3 Nov 2015 13:19:52 +0800 Subject: [U-Boot] [PATCH 1/8] serial: altera_jtag_uart: use BIT macro In-Reply-To: <1446189498-26549-1-git-send-email-thomas@wytron.com.tw> References: <1446189498-26549-1-git-send-email-thomas@wytron.com.tw> Message-ID: <563843F8.1070400@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2015?10?30? 15:18, Thomas Chou wrote: > Replace numerical bit shift with BIT macro > in altera_jtag_uart > > :%s/(1 << nr)/BIT(nr)/g > where nr = 0, 1, 2 .... 31 > > Signed-off-by: Thomas Chou > --- > drivers/serial/altera_jtag_uart.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Applied to u-boot-nios. > diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c > index 39d4a4e..0aa741c 100644 > --- a/drivers/serial/altera_jtag_uart.c > +++ b/drivers/serial/altera_jtag_uart.c > @@ -22,11 +22,11 @@ struct altera_jtaguart_platdata { > }; > > /* data register */ > -#define ALTERA_JTAG_RVALID (1<<15) /* Read valid */ > +#define ALTERA_JTAG_RVALID BIT(15) /* Read valid */ > > /* control register */ > -#define ALTERA_JTAG_AC (1 << 10) /* activity indicator */ > -#define ALTERA_JTAG_RRDY (1 << 12) /* read available */ > +#define ALTERA_JTAG_AC BIT(10) /* activity indicator */ > +#define ALTERA_JTAG_RRDY BIT(12) /* read available */ > #define ALTERA_JTAG_WSPACE(d) ((d)>>16) /* Write space avail */ > /* Write fifo size. FIXME: this should be extracted with sopc2dts */ > #define ALTERA_JTAG_WRITE_DEPTH 64 >