[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1537356734-51676-3-git-send-email-zhongjiang@huawei.com>
Date: Wed, 19 Sep 2018 19:32:11 +0800
From: zhong jiang <zhongjiang@...wei.com>
To: <davem@...emloft.net>
CC: <ubraun@...ux.ibm.com>, <jwi@...ux.ibm.com>, <jhs@...atatu.com>,
<xiyou.wangcong@...il.com>, <Ariel.Elior@...ium.com>,
<everest-linux-l2@...ium.com>, <grygorii.strashko@...com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<borntraeger@...ibm.com>
Subject: [RESEND PATCH 2/5] net: sched: Use FIELD_SIZEOF directly instead of reimplementing its function
FIELD_SIZEOF is defined as a macro to calculate the specified value. Therefore,
We prefer to use the macro rather than calculating its value.
Signed-off-by: zhong jiang <zhongjiang@...wei.com>
---
net/sched/cls_flower.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index 4b8dd37..9aada2d 100644
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -993,7 +993,7 @@ static int fl_init_mask_hashtable(struct fl_flow_mask *mask)
}
#define FL_KEY_MEMBER_OFFSET(member) offsetof(struct fl_flow_key, member)
-#define FL_KEY_MEMBER_SIZE(member) (sizeof(((struct fl_flow_key *) 0)->member))
+#define FL_KEY_MEMBER_SIZE(member) FIELD_SIZEOF(struct fl_flow_key, member)
#define FL_KEY_IS_MASKED(mask, member) \
memchr_inv(((char *)mask) + FL_KEY_MEMBER_OFFSET(member), \
--
1.7.12.4
Powered by blists - more mailing lists