[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1567687896-19996-2-git-send-email-zhongjiang@huawei.com>
Date: Thu, 5 Sep 2019 20:51:34 +0800
From: zhong jiang <zhongjiang@...wei.com>
To: <davem@...emloft.net>, <mareklindner@...mailbox.ch>,
<mchehab@...nel.org>, <leon@...nel.org>
CC: <dledford@...hat.com>, <sakari.ailus@...ux.intel.com>,
<a@...table.cc>, <sw@...onwunderlich.de>,
<linux-kernel@...r.kernel.org>, <linux-media@...r.kernel.org>,
<zhongjiang@...wei.com>
Subject: [PATCH 1/3] batman-adv: Use FIELD_SIZEOF directly
It's more clear to use FIELD_SIZEOF instead of its implementation.
Signed-off-by: zhong jiang <zhongjiang@...wei.com>
---
net/batman-adv/distributed-arp-table.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index b0af3a1..c79fdf8 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -91,8 +91,8 @@ struct batadv_dhcp_packet {
__u8 options[0];
};
-#define BATADV_DHCP_YIADDR_LEN sizeof(((struct batadv_dhcp_packet *)0)->yiaddr)
-#define BATADV_DHCP_CHADDR_LEN sizeof(((struct batadv_dhcp_packet *)0)->chaddr)
+#define BATADV_DHCP_YIADDR_LEN FIELD_SIZEOF(struct batadv_dhcp_packet, yiaddr)
+#define BATADV_DHCP_CHADDR_LEN FIELD_SIZEOF(struct batadv_dhcp_packet, chaddr)
static void batadv_dat_purge(struct work_struct *work);
--
1.7.12.4
Powered by blists - more mailing lists