kdbus: Use sizeof_field() macro
[platform/kernel/linux-rpi.git] / 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));                    \
 })
 
 /**