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 2/3] media: v4l2: Use FIELD_SIZEOF directly
Date: Thu, 5 Sep 2019 20:51:35 +0800 [thread overview]
Message-ID: <1567687896-19996-3-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/media/v4l2-core/v4l2-ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 51b9127..eebea91 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -2637,7 +2637,7 @@ struct v4l2_ioctl_info {
/* Zero struct from after the field to the end */
#define INFO_FL_CLEAR(v4l2_struct, field) \
((offsetof(struct v4l2_struct, field) + \
- sizeof(((struct v4l2_struct *)0)->field)) << 16)
+ FIELD_SIZEOF(struct v4l2_struct, field)) << 16)
#define INFO_FL_CLEAR_MASK (_IOC_SIZEMASK << 16)
#define DEFINE_V4L_STUB_FUNC(_vidioc) \
--
1.7.12.4
next prev parent reply other threads:[~2019-09-05 12:54 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 ` zhong jiang [this message]
2019-09-05 13:53 ` [PATCH 2/3] media: v4l2: " Sakari Ailus
2019-09-05 12:51 ` [PATCH 3/3] IB/mlx5: " zhong jiang
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-3-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
all inboxes | Powered by JetHome®