Skip to contentSkip to conversation

taprio: do not use BIT() in TCA_TAPRIO_ATTR_FLAG_* definitions

PATCH Applied Eugene Syromiatnikov 3 participants 3 messages Mar 24, 2020 – Mar 27, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 taprio: do not use BIT() in TCA_TAPRIO_ATTR_FLAG_* definitions

BIT() macro definition is internal to the Linux kernel and is not to be used in UAPI headers; replace its usage with the _BITUL() macro that is already used elsewhere in the header.

Cc <[email protected]> # v5.4+
Fixes 9c66d1564676 ("taprio: Add support for hardware offloading")
---
 include/uapi/linux/pkt_sched.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/pkt_sched.h +2 -2
index bbe791b..0e43f67 100644
@@ -1197,8 +1197,8 @@ enum {
  *       [TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL]
  */
 
-#define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST	BIT(0)
-#define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD	BIT(1)
+#define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST	_BITUL(0)
+#define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD	_BITUL(1)
 
 enum {
 	TCA_TAPRIO_ATTR_UNSPEC,
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw

Hi Eugene,

Quoted 9 lines · Eugene Syromiatnikov

BIT() macro definition is internal to the Linux kernel and is not to be used in UAPI headers; replace its usage with the _BITUL() macro that is already used elsewhere in the header.

Cc <[email protected]> # v5.4+
Fixes 9c66d1564676 ("taprio: Add support for hardware offloading")

---

I see this mirrors what was done in commit

commit 9903c8dc734265689d5770ff28c84a7228fe5890

Author: Vedang Patel <[email protected]>
Date:   Tue Jun 25 15:07:13 2019 -0700

etf: Don't use BIT() in UAPI headers.

The BIT() macro isn't exported as part of the UAPI interface. So, the compile-test to ensure they are self contained fails. So, use _BITUL() instead.

so

Quoted 19 lines
 include/uapi/linux/pkt_sched.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/pkt_sched.h +2 -3
index bbe791b..0e43f67 100644
@@ -1197,8 +1197,8 @@ enum {
  *       [TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL]
  */
 
-#define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST     BIT(0)
-#define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD      BIT(1)
+#define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST     _BITUL(0)
+#define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD      _BITUL(1)
 
 enum {
        TCA_TAPRIO_ATTR_UNSPEC,
--
Quoted 2 lines

2.1.4

Regards,
-Vladimir

maintainer Applied
#2 lore raw
In reply to Eugene Syromiatnikov

From: Eugene Syromiatnikov <[email protected]>
Date: Tue, 24 Mar 2020 05:19:20 +0100

Quoted 7 lines

BIT() macro definition is internal to the Linux kernel and is not to be used in UAPI headers; replace its usage with the _BITUL() macro that is already used elsewhere in the header.

Cc <[email protected]> # v5.4+
Fixes 9c66d1564676 ("taprio: Add support for hardware offloading")

Applied.