Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1084289ybe; Thu, 5 Sep 2019 10:03:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUGphZNUaeOo9vOM3ntggqANiMHW0PrJrlUnCV6/YmK5BNF/TnH8IqHKzTGcK7N4mFW0hU X-Received: by 2002:a17:90a:e651:: with SMTP id ep17mr5029373pjb.59.1567703026939; Thu, 05 Sep 2019 10:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567703026; cv=none; d=google.com; s=arc-20160816; b=IiqFiL30Zs92cURSGbjH2WQuK7DY6BCouXO3rmz2cSjo9hRGcBGIWUmBA8r/JqsDPT PhvUkGWUO/VXSEDRYAefPryPswQkO7Y5YYcC3iATQtEgJfqcCn67DOOl1g/sZV/Gg8nU z7BDAUxv2+BeUqi70gEa6O2v3czR0URssPZJfUKPI+nmgBrIdXjRN9jxhO2bUb8dNJb/ xuIa2J32iz9O/YclmRU7lhBPaG6Um1zDm6AghWXe0L17kGUZTehDDqSjVCf/qsz0XiI4 jkl9W6R7Y1dMwfFd++MN+FtRrU7Lbz5bdOzlGLsM1nCCKieCdaeCQbXjmt2YvR/HzPQg +7Hw== 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=E0DczAv3QIHWHs4c7hQ6sRE2kWVwSq2XPeFM5PdHSNE=; b=vobNwJmJY3sr3x+KURzknWzoBFpZLuGvhwO6zQ+PmTx8aHe8vTCmg4DIL8pTWqvNu2 l2GZF8/o6OQcGyO72msCwmdCNXPt0p5mqp+hzFmElcnvtApUkvylmA4gwLwKYIfeuTna KcVhsQPRs0Dez/MHjrnRxTWz50u2V27YZDUEOAuowdeoePP7OfQTbLhdhN+3oS6JG3Cn cLZ4knpNG3e/ljy9QIUbFag/vgJ8/yxfE4mwRQAFcuNxHBs50pzG35ik4aDFO3NxYkkl vCb0DGENNmk8fEpa19DoOpG5FrVToHGBQnp8LMZ1zd2LmkZMlYpPsuRpyFkQNZKVDR3j ++hQ== 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 ba10si2472318plb.152.2019.09.05.10.03.28; Thu, 05 Sep 2019 10:03:46 -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 S2389570AbfIEMzB (ORCPT + 99 others); Thu, 5 Sep 2019 08:55:01 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:52388 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387935AbfIEMzA (ORCPT ); Thu, 5 Sep 2019 08:55:00 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3319FE358CB6CF2A43B4; 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:37 +0800 From: zhong jiang To: , , , CC: , , , , , , Subject: [PATCH 3/3] IB/mlx5: Use FIELD_SIZEOF directly Date: Thu, 5 Sep 2019 20:51:36 +0800 Message-ID: <1567687896-19996-4-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 --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index c3ea299..e5681f7 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -65,7 +65,7 @@ __LINE__, current->pid, ##arg) #define field_avail(type, fld, sz) (offsetof(type, fld) + \ - sizeof(((type *)0)->fld) <= (sz)) + FIELD_SIZEOF(type, fld) <= (sz)) #define MLX5_IB_DEFAULT_UIDX 0xffffff #define MLX5_USER_ASSIGNED_UIDX_MASK __mlx5_mask(qpc, user_index) -- 1.7.12.4