Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1002076ybe; Thu, 5 Sep 2019 08:56:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyY2iPbGSxeL+/fxOTnZ3FKdGDhSX+Vec352EBImBB5fzG1/s3LkRwE9LkIjV9R55rM5lUB X-Received: by 2002:a62:cdca:: with SMTP id o193mr4844290pfg.204.1567699008245; Thu, 05 Sep 2019 08:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567699008; cv=none; d=google.com; s=arc-20160816; b=AzM5/OAdcdYLEleoAANBP8SWDvFEL/NxoHd1+SiFzZGuGpmUcIN1JYbl3QLsLjYdgz Yg7tCVY5ZOiFuz/NmiSmQF3w0dTVYeOPeO128G1X5+RHiyJe04PP2+/wRwHFvBZvuvy/ pE2lKU5y1JxYU03pWSzQPQVfEMAY3XWHlQgWZ+BbKRc/1zX5msSxsBNnb09uyhT1wZ1q PLcIvoSI3APRDcM4mLSxih/1DBBiLf9XS0dfaqkfaukSc1uN8sXJgIRu6ljsVBF7c51E 9/1+6HoQBWXEG65KVp6l2U2PulieSaABblDOcZ8kzOkVXbWSQvAdS4gA/ZOCxNypqip6 W5mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=axmD1JbvmBiuNV1FIWg77R6TFd6/21lHkWskdmmxT2w=; b=dBP114nELFm/sxyyKq3rV+H0Uhbl1NGtdW3H2v7MQvO/GjzGKzYQIVLzGwrY5HWfLA TBZrIRn7D1a/yNg4dtVclRmyglJHDWb9oulQNST1Qaq5NaKZwf6jRiYqL2vozjA1xi5D QBtZ9T1FvthYwy1yQsOh7mlz4XPgoSn5S0ll03HPTyh93AjsADfXqGZ5OO5rX6Gkt6n/ uxkCrYqxeWR52DFr1PQvhpoNKapvSlHG4fGcRXGJy3VNNGY/+hGraKCjWLOwQ3P3rT6s fu5XMhh3uJoYWIxqG6B0+p5KgkDum2q5c3Ab2s6IcZJoPWEObwTYMf4RcrMSGM9NoXGB HApQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si2319464plt.26.2019.09.05.08.56.29; Thu, 05 Sep 2019 08:56:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389487AbfIEMyr (ORCPT + 99 others); Thu, 5 Sep 2019 08:54:47 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:52390 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389222AbfIEMyr (ORCPT ); Thu, 5 Sep 2019 08:54:47 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3F3DD6C0AF5D3E88FA96; Thu, 5 Sep 2019 20:54:43 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Thu, 5 Sep 2019 20:54:35 +0800 From: zhong jiang To: , , , CC: , , , , , , Subject: [PATCH 1/3] batman-adv: Use FIELD_SIZEOF directly Date: Thu, 5 Sep 2019 20:51:34 +0800 Message-ID: <1567687896-19996-2-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1567687896-19996-1-git-send-email-zhongjiang@huawei.com> References: <1567687896-19996-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's more clear to use FIELD_SIZEOF instead of its implementation. Signed-off-by: zhong jiang --- 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