From 4312638eaf7f0bd29ffa8c7957bd51c5eb7d5a32 Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Tue, 8 Sep 2020 19:00:00 +0200 Subject: usb: xhci: convert to TRB_LEN() and TRB_INTR_TARGET() For normal TRB fields: use TRB_LEN(x) instead of ((x) & TRB_LEN_MASK); and use TRB_INTR_TARGET(x) instead of (((x) & TRB_INTR_TARGET_MASK) << TRB_INTR_TARGET_SHIFT) Signed-off-by: Chunfeng Yun Reviewed-by: Bin Meng --- include/usb/xhci.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/usb/xhci.h b/include/usb/xhci.h index bdba51df599..35c66042baa 100644 --- a/include/usb/xhci.h +++ b/include/usb/xhci.h @@ -847,12 +847,9 @@ struct xhci_event_cmd { /* Normal TRB fields */ /* transfer_len bitmasks - bits 0:16 */ #define TRB_LEN(p) ((p) & 0x1ffff) -#define TRB_LEN_MASK (0x1ffff) /* TD Size, packets remaining in this TD, bits 21:17 (5 bits, so max 31) */ #define TRB_TD_SIZE(p) (min((p), (u32)31) << 17) /* Interrupter Target - which MSI-X vector to target the completion event at */ -#define TRB_INTR_TARGET_SHIFT (22) -#define TRB_INTR_TARGET_MASK (0x3ff) #define TRB_INTR_TARGET(p) (((p) & 0x3ff) << 22) #define GET_INTR_TARGET(p) (((p) >> 22) & 0x3ff) #define TRB_TBC(p) (((p) & 0x3) << 7) -- cgit v1.3.1