mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: wilco_ec: Include asm/unaligned instead of linux/ path
@ 2020-02-03 17:46 Stephen Boyd
  2020-02-11  9:40 ` Enric Balletbo i Serra
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2020-02-03 17:46 UTC (permalink / raw)
  To: Benson Leung, Enric Balletbo i Serra
  Cc: linux-kernel, Nick Crews, kbuild test robot

It seems that we shouldn't try to include the include/linux/ path to
unaligned functions. Just include asm/unaligned.h instead so that we
don't run into compilation warnings like below.

   In file included from drivers/platform/chrome/wilco_ec/properties.c:8:0:
   include/linux/unaligned/le_memmove.h:7:19: error: redefinition of 'get_unaligned_le16'
    static inline u16 get_unaligned_le16(const void *p)
                      ^~~~~~~~~~~~~~~~~~
   In file included from arch/ia64/include/asm/unaligned.h:5:0,
                    from arch/ia64/include/asm/io.h:23,
                    from arch/ia64/include/asm/smp.h:21,
                    from include/linux/smp.h:68,
                    from include/linux/percpu.h:7,
                    from include/linux/arch_topology.h:9,
                    from include/linux/topology.h:30,
                    from include/linux/gfp.h:9,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:18,
                    from include/linux/idr.h:15,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/platform_data/wilco-ec.h:11,
                    from drivers/platform/chrome/wilco_ec/properties.c:6:
   include/linux/unaligned/le_struct.h:7:19: note: previous definition of 'get_unaligned_le16' was here
    static inline u16 get_unaligned_le16(const void *p)
                      ^~~~~~~~~~~~~~~~~~
Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 60fb8a8e93ca ("platform/chrome: wilco_ec: Allow wilco to be compiled in COMPILE_TEST")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/platform/chrome/wilco_ec/properties.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/wilco_ec/properties.c b/drivers/platform/chrome/wilco_ec/properties.c
index e69682c95ea2..62f27610dd33 100644
--- a/drivers/platform/chrome/wilco_ec/properties.c
+++ b/drivers/platform/chrome/wilco_ec/properties.c
@@ -5,7 +5,7 @@
 
 #include <linux/platform_data/wilco-ec.h>
 #include <linux/string.h>
-#include <linux/unaligned/le_memmove.h>
+#include <asm/unaligned.h>
 
 /* Operation code; what the EC should do with the property */
 enum ec_property_op {
-- 
Sent by a computer, using git, on the internet


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

* Re: [PATCH] platform/chrome: wilco_ec: Include asm/unaligned instead of linux/ path
  2020-02-03 17:46 [PATCH] platform/chrome: wilco_ec: Include asm/unaligned instead of linux/ path Stephen Boyd
@ 2020-02-11  9:40 ` Enric Balletbo i Serra
  0 siblings, 0 replies; 2+ messages in thread
From: Enric Balletbo i Serra @ 2020-02-11  9:40 UTC (permalink / raw)
  To: Stephen Boyd, Benson Leung; +Cc: linux-kernel, Nick Crews, kbuild test robot

Hi Stephen,

On 3/2/20 18:46, Stephen Boyd wrote:
> It seems that we shouldn't try to include the include/linux/ path to
> unaligned functions. Just include asm/unaligned.h instead so that we
> don't run into compilation warnings like below.
> 
>    In file included from drivers/platform/chrome/wilco_ec/properties.c:8:0:
>    include/linux/unaligned/le_memmove.h:7:19: error: redefinition of 'get_unaligned_le16'
>     static inline u16 get_unaligned_le16(const void *p)
>                       ^~~~~~~~~~~~~~~~~~
>    In file included from arch/ia64/include/asm/unaligned.h:5:0,
>                     from arch/ia64/include/asm/io.h:23,
>                     from arch/ia64/include/asm/smp.h:21,
>                     from include/linux/smp.h:68,
>                     from include/linux/percpu.h:7,
>                     from include/linux/arch_topology.h:9,
>                     from include/linux/topology.h:30,
>                     from include/linux/gfp.h:9,
>                     from include/linux/xarray.h:14,
>                     from include/linux/radix-tree.h:18,
>                     from include/linux/idr.h:15,
>                     from include/linux/kernfs.h:13,
>                     from include/linux/sysfs.h:16,
>                     from include/linux/kobject.h:20,
>                     from include/linux/device.h:16,
>                     from include/linux/platform_data/wilco-ec.h:11,
>                     from drivers/platform/chrome/wilco_ec/properties.c:6:
>    include/linux/unaligned/le_struct.h:7:19: note: previous definition of 'get_unaligned_le16' was here
>     static inline u16 get_unaligned_le16(const void *p)
>                       ^~~~~~~~~~~~~~~~~~
> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: 60fb8a8e93ca ("platform/chrome: wilco_ec: Allow wilco to be compiled in COMPILE_TEST")
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---

Queued as a fix for 5.6. Thanks,

  Enric

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

end of thread, other threads:[~2020-02-11  9:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 17:46 [PATCH] platform/chrome: wilco_ec: Include asm/unaligned instead of linux/ path Stephen Boyd
2020-02-11  9:40 ` Enric Balletbo i Serra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®