Re: [PATCH 2/3] media: v4l2: Use FIELD_SIZEOF directly

2019-09-05 Thread Sakari Ailus
On Thu, Sep 05, 2019 at 08:51:35PM +0800, zhong jiang wrote:
> It's more clear  to use FIELD_SIZEOF instead of its implementation.
> 
> Signed-off-by: zhong jiang 

Acked-by: Sakari Ailus 

-- 
Sakari Ailus
sakari.ai...@linux.intel.com


[PATCH 2/3] media: v4l2: Use FIELD_SIZEOF directly

2019-09-05 Thread zhong jiang
It's more clear  to use FIELD_SIZEOF instead of its implementation.

Signed-off-by: zhong jiang 
---
 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