diff mbox series

clocksource: arc_timer: use BIT() instead of _BITUL()

Message ID 20190524054010.19323-1-yamada.masahiro@socionext.com
State New
Headers show
Series clocksource: arc_timer: use BIT() instead of _BITUL() | expand

Commit Message

Masahiro Yamada May 24, 2019, 5:40 a.m. UTC
This is in-kernel C code, so there is no reason to use _BITUL().
Replace it with equivalent BIT().

I added #include <linux/bits.h> explicitly although it has been included
by other headers eventually.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/clocksource/arc_timer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Daniel Lezcano May 31, 2019, 2:25 p.m. UTC | #1
On 24/05/2019 07:40, Masahiro Yamada wrote:
> This is in-kernel C code, so there is no reason to use _BITUL().
> Replace it with equivalent BIT().
> 
> I added #include <linux/bits.h> explicitly although it has been included
> by other headers eventually.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Applied, thanks!
diff mbox series

Patch

diff --git a/drivers/clocksource/arc_timer.c b/drivers/clocksource/arc_timer.c
index b28970ca4a7a..b1f21bf3b83c 100644
--- a/drivers/clocksource/arc_timer.c
+++ b/drivers/clocksource/arc_timer.c
@@ -16,6 +16,7 @@ 
  */
 
 #include <linux/interrupt.h>
+#include <linux/bits.h>
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
 #include <linux/clocksource.h>
@@ -142,7 +143,7 @@  static u64 arc_read_rtc(struct clocksource *cs)
 		l = read_aux_reg(AUX_RTC_LOW);
 		h = read_aux_reg(AUX_RTC_HIGH);
 		status = read_aux_reg(AUX_RTC_CTRL);
-	} while (!(status & _BITUL(31)));
+	} while (!(status & BIT(31)));
 
 	return (((u64)h) << 32) | l;
 }