From: zhong jiang <zhongjiang@huawei.com>
To: <davem@davemloft.net>, <mareklindner@neomailbox.ch>,
<mchehab@kernel.org>, <leon@kernel.org>
Cc: <dledford@redhat.com>, <sakari.ailus@linux.intel.com>,
<a@unstable.cc>, <sw@simonwunderlich.de>,
<linux-kernel@vger.kernel.org>, <linux-media@vger.kernel.org>,
<zhongjiang@huawei.com>
Subject: [PATCH 3/3] IB/mlx5: Use FIELD_SIZEOF directly
Date: Thu, 5 Sep 2019 20:51:36 +0800 [thread overview]
Message-ID: <1567687896-19996-4-git-send-email-zhongjiang@huawei.com> (raw)
In-Reply-To: <1567687896-19996-1-git-send-email-zhongjiang@huawei.com>
It's more clear to use FIELD_SIZEOF instead of its implementation.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
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
prev parent reply other threads:[~2019-09-05 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 12:51 [PATCH 0/3] replace code with FIELD_SIZEOF zhong jiang
2019-09-05 12:51 ` [PATCH 1/3] batman-adv: Use FIELD_SIZEOF directly zhong jiang
2019-09-05 12:51 ` [PATCH 2/3] media: v4l2: " zhong jiang
2019-09-05 13:53 ` Sakari Ailus
2019-09-05 12:51 ` zhong jiang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1567687896-19996-4-git-send-email-zhongjiang@huawei.com \
--to=zhongjiang@huawei.com \
--cc=a@unstable.cc \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mareklindner@neomailbox.ch \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sw@simonwunderlich.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).