All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] include/linux/property.h: fix typo/compile error
@ 2016-09-29  2:10 John Youn
  2016-09-30  0:21 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: John Youn @ 2016-09-29  2:10 UTC (permalink / raw)
  To: John Youn, linux-kernel, Hanjun Guo, Andy Shevchenko,
	Andrew Morton, Suthikulpanit, Suravee, Mika Westerberg,
	Rafael J. Wysocki, Bjorn Helgaas, Heikki Krogerus

This fixes commit d76eebfa175e ("include/linux/property.h: fix build
issues with gcc-4.4.4").

With that commit we get the following compile error when using the
PROPERTY_ENTRY_INTEGER_ARRAY macro.

../include/linux/property.h:201:39: error: ‘u32_data’ undeclared (first
                 use in this function)
  PROPERTY_ENTRY_INTEGER_ARRAY(_name_, u32, _val_)
                                       ^
../include/linux/property.h:193:17: note: in definition of macro
                 ‘PROPERTY_ENTRY_INTEGER_ARRAY’
  { .pointer = { _type_##_data = _val_ } },  \
                 ^

This needs a '.' to reference the union member. It seems this was just
overlooked here since it is done correctly in similar constructs in
other parts of the original commit.

This fix is in preparation of upcoming commits that will use this macro.

Fixes: commit d76eebfa175e ("include/linux/property.h: fix build issues with gcc-4.4.4")
Signed-off-by: John Youn <johnyoun@synopsys.com>
---
 include/linux/property.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/property.h b/include/linux/property.h
index 3a2f9ae..856e50b 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -190,7 +190,7 @@ struct property_entry {
 	.length = ARRAY_SIZE(_val_) * sizeof(_type_),		\
 	.is_array = true,					\
 	.is_string = false,					\
-	{ .pointer = { _type_##_data = _val_ } },		\
+	{ .pointer = { ._type_##_data = _val_ } },		\
 }
 
 #define PROPERTY_ENTRY_U8_ARRAY(_name_, _val_)			\
-- 
2.10.0

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

* Re: [PATCH] include/linux/property.h: fix typo/compile error
  2016-09-29  2:10 [PATCH] include/linux/property.h: fix typo/compile error John Youn
@ 2016-09-30  0:21 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-09-30  0:21 UTC (permalink / raw)
  To: John Youn
  Cc: linux-kernel, Hanjun Guo, Andy Shevchenko, Andrew Morton,
	Suthikulpanit, Suravee, Mika Westerberg, Bjorn Helgaas,
	Heikki Krogerus

On 9/29/2016 4:10 AM, John Youn wrote:
> This fixes commit d76eebfa175e ("include/linux/property.h: fix build
> issues with gcc-4.4.4").
>
> With that commit we get the following compile error when using the
> PROPERTY_ENTRY_INTEGER_ARRAY macro.
>
> ../include/linux/property.h:201:39: error: ‘u32_data’ undeclared (first
>                   use in this function)
>    PROPERTY_ENTRY_INTEGER_ARRAY(_name_, u32, _val_)
>                                         ^
> ../include/linux/property.h:193:17: note: in definition of macro
>                   ‘PROPERTY_ENTRY_INTEGER_ARRAY’
>    { .pointer = { _type_##_data = _val_ } },  \
>                   ^
>
> This needs a '.' to reference the union member. It seems this was just
> overlooked here since it is done correctly in similar constructs in
> other parts of the original commit.
>
> This fix is in preparation of upcoming commits that will use this macro.
>
> Fixes: commit d76eebfa175e ("include/linux/property.h: fix build issues with gcc-4.4.4")
> Signed-off-by: John Youn <johnyoun@synopsys.com>

Applied.

Thanks,
Rafael


> ---
>   include/linux/property.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/property.h b/include/linux/property.h
> index 3a2f9ae..856e50b 100644
> --- a/include/linux/property.h
> +++ b/include/linux/property.h
> @@ -190,7 +190,7 @@ struct property_entry {
>   	.length = ARRAY_SIZE(_val_) * sizeof(_type_),		\
>   	.is_array = true,					\
>   	.is_string = false,					\
> -	{ .pointer = { _type_##_data = _val_ } },		\
> +	{ .pointer = { ._type_##_data = _val_ } },		\
>   }
>   
>   #define PROPERTY_ENTRY_U8_ARRAY(_name_, _val_)			\

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

end of thread, other threads:[~2016-09-30  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29  2:10 [PATCH] include/linux/property.h: fix typo/compile error John Youn
2016-09-30  0:21 ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.