diff mbox

[U-Boot,03/11] usb: dwc3: Add BIT() macro

Message ID 1424700152-8554-4-git-send-email-l.majewski@samsung.com
State Awaiting Upstream
Delegated to: Łukasz Majewski
Headers show

Commit Message

Łukasz Majewski Feb. 23, 2015, 2:02 p.m. UTC
From: Inha Song <ideal.song@samsung.com>

Signed-off-by: Inha Song <ideal.song@samsung.com>
---
 drivers/usb/dwc3/core.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Marek Vasut Feb. 23, 2015, 3:04 p.m. UTC | #1
On Monday, February 23, 2015 at 03:02:24 PM, Lukasz Majewski wrote:
> From: Inha Song <ideal.song@samsung.com>
> 
> Signed-off-by: Inha Song <ideal.song@samsung.com>

Is such confusing macro really necessary please ?

Moreover, the #define BIT(x) (1 << x) should really be #define BIT(x) (1 << (x))
(with (x) in round brackets).

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 3f8a4e9..3355468 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -392,6 +392,7 @@  struct dwc3_event_buffer {
 	unsigned int		count;
 	unsigned int		flags;
 
+#define BIT(x)			(1 << x)
 #define DWC3_EVENT_PENDING	BIT(0)
 
 	dma_addr_t		dma;