diff options
author | zhong jiang <zhongjiang@huawei.com> | 2018-09-19 13:32:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-20 05:58:04 +0200 |
commit | cb205a817444f4838547e9f19438b96fdc32d5b6 (patch) | |
tree | ceed9d57b66c1c7aa0160dc8077ceb746cdce024 /net/sched/cls_flower.c | |
parent | net: iucv: Use FIELD_SIZEOF directly instead of reimplementing its function (diff) | |
download | linux-cb205a817444f4838547e9f19438b96fdc32d5b6.tar.xz linux-cb205a817444f4838547e9f19438b96fdc32d5b6.zip |
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@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_flower.c')
-rw-r--r-- | net/sched/cls_flower.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 4b8dd37dd4f8..9aada2d0ef06 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), \ |