kdbus: Use sizeof_field() macro
authorŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 28 Jan 2021 16:31:15 +0000 (17:31 +0100)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 30 Mar 2021 01:44:59 +0000 (10:44 +0900)
Replace of FIELD_SIZEOF() with sizeof_field().

Change-Id: I6647be8fa77ca24bfa3b8d1ed57e8fc6a5a4c98a
Fixes: c593642c8be0 ("treewide: Use sizeof_field() macro")
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
ipc/kdbus/util.h

index cf1403b..38c2ed5 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <linux/dcache.h>
 #include <linux/ioctl.h>
+#include <linux/stddef.h>
 
 #include <uapi/linux/kdbus.h>
 
@@ -40,7 +41,7 @@
 ({                                                                     \
        u64 __user *_sz =                                               \
                (void __user *)((u8 __user *)(_b) + offsetof(_t, _m));  \
-       copy_to_user(_sz, _s, FIELD_SIZEOF(_t, _m));                    \
+       copy_to_user(_sz, _s, sizeof_field(_t, _m));                    \
 })
 
 /**