Blame SOURCES/0063-utils-Move-BIT-macro-to-common-header.patch

99be8f
From 42a457a97118379936cdeb20eef1d116e858d4c1 Mon Sep 17 00:00:00 2001
99be8f
From: Andrea Claudi <aclaudi@redhat.com>
99be8f
Date: Mon, 25 Mar 2019 13:30:09 +0100
99be8f
Subject: [PATCH] utils: Move BIT macro to common header
99be8f
99be8f
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1642479
99be8f
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1641914
99be8f
Upstream Status: iproute2.git commit afdc119410efe
99be8f
99be8f
commit afdc119410efe2a5e826c660446b1e4e1a72793d
99be8f
Author: Leon Romanovsky <leonro@mellanox.com>
99be8f
Date:   Sun Aug 20 12:58:21 2017 +0300
99be8f
99be8f
    utils: Move BIT macro to common header
99be8f
99be8f
    BIT() macro was implemented and used by devlink for now, but following
99be8f
    patches of rdmatool will reuse the same macro, so put it in common
99be8f
    header file.
99be8f
99be8f
    Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
99be8f
---
99be8f
 devlink/devlink.c | 2 +-
99be8f
 include/utils.h   | 2 ++
99be8f
 2 files changed, 3 insertions(+), 1 deletion(-)
99be8f
99be8f
diff --git a/devlink/devlink.c b/devlink/devlink.c
99be8f
index 92e78c9c8d9f6..2000db81aabb0 100644
99be8f
--- a/devlink/devlink.c
99be8f
+++ b/devlink/devlink.c
99be8f
@@ -25,6 +25,7 @@
99be8f
 #include "list.h"
99be8f
 #include "mnlg.h"
99be8f
 #include "json_writer.h"
99be8f
+#include "utils.h"
99be8f
 
99be8f
 #define ESWITCH_MODE_LEGACY "legacy"
99be8f
 #define ESWITCH_MODE_SWITCHDEV "switchdev"
99be8f
@@ -164,7 +165,6 @@ static void ifname_map_free(struct ifname_map *ifname_map)
99be8f
 	free(ifname_map);
99be8f
 }
99be8f
 
99be8f
-#define BIT(nr)                 (1UL << (nr))
99be8f
 #define DL_OPT_HANDLE		BIT(0)
99be8f
 #define DL_OPT_HANDLEP		BIT(1)
99be8f
 #define DL_OPT_PORT_TYPE	BIT(2)
99be8f
diff --git a/include/utils.h b/include/utils.h
99be8f
index 8c12e1e2a60c2..d707a9dacdb85 100644
99be8f
--- a/include/utils.h
99be8f
+++ b/include/utils.h
99be8f
@@ -208,6 +208,8 @@ static inline void __jiffies_to_tv(struct timeval *tv, unsigned long jiffies)
99be8f
 int print_timestamp(FILE *fp);
99be8f
 void print_nlmsg_timestamp(FILE *fp, const struct nlmsghdr *n);
99be8f
 
99be8f
+#define BIT(nr)                 (1UL << (nr))
99be8f
+
99be8f
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
99be8f
 
99be8f
 #define BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)]))
99be8f
-- 
99be8f
2.20.1
99be8f