linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kdbus: use FIELD_SIZEOF in kdbus_member_set_user macro
@ 2015-06-04 10:39 Sergei Zviagintsev
  2015-06-04 11:30 ` David Herrmann
  2015-06-05 11:52 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Sergei Zviagintsev @ 2015-06-04 10:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Daniel Mack, David Herrmann, Djalal Harouni
  Cc: linux-kernel, Sergei Zviagintsev

sizeof(((_t *)0)->_m) -> FIELD_SIZEOF(_t, _m)

Use conventional macro according to chapter 17 of
Documentation/CodingStyle.

Signed-off-by: Sergei Zviagintsev <sergei@s15v.net>
---
 ipc/kdbus/util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipc/kdbus/util.h b/ipc/kdbus/util.h
index 9fedf8ab41cd..529716669fe7 100644
--- a/ipc/kdbus/util.h
+++ b/ipc/kdbus/util.h
@@ -40,7 +40,7 @@
 ({									\
 	u64 __user *_sz =						\
 		(void __user *)((u8 __user *)(_b) + offsetof(_t, _m));	\
-	copy_to_user(_sz, _s, sizeof(((_t *)0)->_m));			\
+	copy_to_user(_sz, _s, FIELD_SIZEOF(_t, _m));			\
 })
 
 /**
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kdbus: use FIELD_SIZEOF in kdbus_member_set_user macro
  2015-06-04 10:39 [PATCH] kdbus: use FIELD_SIZEOF in kdbus_member_set_user macro Sergei Zviagintsev
@ 2015-06-04 11:30 ` David Herrmann
  2015-06-05 11:52 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: David Herrmann @ 2015-06-04 11:30 UTC (permalink / raw)
  To: Sergei Zviagintsev
  Cc: Greg Kroah-Hartman, Daniel Mack, David Herrmann, Djalal Harouni,
	linux-kernel

Hi

On Thu, Jun 4, 2015 at 12:39 PM, Sergei Zviagintsev <sergei@s15v.net> wrote:
> sizeof(((_t *)0)->_m) -> FIELD_SIZEOF(_t, _m)
>
> Use conventional macro according to chapter 17 of
> Documentation/CodingStyle.
>
> Signed-off-by: Sergei Zviagintsev <sergei@s15v.net>
> ---
>  ipc/kdbus/util.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>

Thanks
David

> diff --git a/ipc/kdbus/util.h b/ipc/kdbus/util.h
> index 9fedf8ab41cd..529716669fe7 100644
> --- a/ipc/kdbus/util.h
> +++ b/ipc/kdbus/util.h
> @@ -40,7 +40,7 @@
>  ({                                                                     \
>         u64 __user *_sz =                                               \
>                 (void __user *)((u8 __user *)(_b) + offsetof(_t, _m));  \
> -       copy_to_user(_sz, _s, sizeof(((_t *)0)->_m));                   \
> +       copy_to_user(_sz, _s, FIELD_SIZEOF(_t, _m));                    \
>  })
>
>  /**
> --
> 1.8.3.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kdbus: use FIELD_SIZEOF in kdbus_member_set_user macro
  2015-06-04 10:39 [PATCH] kdbus: use FIELD_SIZEOF in kdbus_member_set_user macro Sergei Zviagintsev
  2015-06-04 11:30 ` David Herrmann
@ 2015-06-05 11:52 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2015-06-05 11:52 UTC (permalink / raw)
  To: Sergei Zviagintsev
  Cc: Daniel Mack, David Herrmann, Djalal Harouni, linux-kernel

On Thu, Jun 04, 2015 at 01:39:30PM +0300, Sergei Zviagintsev wrote:
> sizeof(((_t *)0)->_m) -> FIELD_SIZEOF(_t, _m)
> 
> Use conventional macro according to chapter 17 of
> Documentation/CodingStyle.
> 
> Signed-off-by: Sergei Zviagintsev <sergei@s15v.net>
> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>

Applied, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-05 11:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04 10:39 [PATCH] kdbus: use FIELD_SIZEOF in kdbus_member_set_user macro Sergei Zviagintsev
2015-06-04 11:30 ` David Herrmann
2015-06-05 11:52 ` Greg Kroah-Hartman

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).