Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp643083imm; Wed, 19 Sep 2018 04:46:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbFGiX+CKTeubQBBZ6FSSpBBJQlV1SakQrX0Ukqxcna87LVLlAAnXFEbdiyygQ/PUM8cp0s X-Received: by 2002:a62:7d8d:: with SMTP id y135-v6mr35352225pfc.259.1537357584223; Wed, 19 Sep 2018 04:46:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537357584; cv=none; d=google.com; s=arc-20160816; b=cwdYOR0z1Opbmp7H6UWng5xeqaePtOJS330tclpk9voTB0Nm6QaQWq0Y4yHIdFhmQi u7uqXVstyHTs5nCoWYCmaGFGd5ZQZoBVYvkPth/344K7Ts2NrZ7PQL/ZbsZQ54KJGJBw cvlutfiyYKqtc7Re+UlcYDar35z7mVi+3Ax35dLISOcLTbruxJZfUyWFRtx28Nc4BikK p89gECzRbOntSKZLpTyd0tPckLHDiu9clM2UHfOj4Gcf1Lk2PFB4kL3ZMbb9YFT+w87p dPQ8jwxhYKw5GgSBB6U1ZSpz0yb6RBL+bdITQZablTpMkz33DoDSRi0XxwKfZkkBgR6O QaEA== 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=aJ3KZ/za0DL8pdUjBgrM7TGO/NySN/h5yolytUJ+tWo=; b=HyhsEGSng5gHrjGwUzTTQYxVbnEw/iDjb8kpp5JIa0+Sd5G1uYIeZ3YRcniXHLtX1e lR3v4s/h7vZoEgQ0hkjuP+dw04fbZtUTBwtzh6BQBY2Pqi171kgbhcIxOHWArNXMxVpM PslCRyjtRzNTaKouAOKL/x8jCslZJDe1shmUTjyprjEG9X9yZjx0wNCLhPYGoZU8e368 xYj2/qm9b4cd8EeF7onHG/+8igvZPOG79pxoRoawGnjL1vYvMq+W+yb9g9lD3dKSp8vH n537PIcPER9MUSCFA0jaj3T4T6F7U+r0gqLH69jdHDqnoultXgakdwfi+iiH4+GKkzPq CyXw== 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 d13-v6si21157076pll.337.2018.09.19.04.46.08; Wed, 19 Sep 2018 04:46:24 -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 S1731614AbeISRWa (ORCPT + 99 others); Wed, 19 Sep 2018 13:22:30 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:12197 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731136AbeISRWQ (ORCPT ); Wed, 19 Sep 2018 13:22:16 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id ABC94E5E8BD6; Wed, 19 Sep 2018 19:44:39 +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.399.0; Wed, 19 Sep 2018 19:44:38 +0800 From: zhong jiang To: CC: , , , , , , , , , Subject: [RESEND PATCH 4/5] net: qede: Use FIELD_SIZEOF directly instead of reimplementing its function Date: Wed, 19 Sep 2018 19:32:13 +0800 Message-ID: <1537356734-51676-5-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1537356734-51676-1-git-send-email-zhongjiang@huawei.com> References: <1537356734-51676-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 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 --- drivers/net/ethernet/qlogic/qede/qede.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede.h b/drivers/net/ethernet/qlogic/qede/qede.h index 6a4d266..de98a97 100644 --- a/drivers/net/ethernet/qlogic/qede/qede.h +++ b/drivers/net/ethernet/qlogic/qede/qede.h @@ -440,7 +440,7 @@ struct qede_fastpath { struct qede_tx_queue *txq; struct qede_tx_queue *xdp_tx; -#define VEC_NAME_SIZE (sizeof(((struct net_device *)0)->name) + 8) +#define VEC_NAME_SIZE (FIELD_SIZEOF(struct net_device, name) + 8) char name[VEC_NAME_SIZE]; }; -- 1.7.12.4