-
Vinod Koul authored
get_unaligned_le16() is defined in linux/unaligned/access_ok.h header but it uses symbols which may not be available, leading to build failures on ia64. Using asm/unaligned.h seem to be the right thing and used in other drivers. This fixes below error reported by kbuild test robot In file included from drivers/usb/host/xhci-pci-renesas.c:9: >> include/linux/unaligned/access_ok.h:8:28: error: redefinition of 'get_unaligned_le16' 8 | static __always_inline u16 get_unaligned_le16(const void *p) | ^~~~~~~~~~~~~~~~~~ In file included from arch/ia64/include/asm/unaligned.h:5, from arch/ia64/include/asm/io.h:23, from arch/ia64/include/asm/smp.h:21, from include/linux/smp.h:67, 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/of.h:17, from include/linux/irqdomain.h:35, from include/linux/acpi.h:13, from drivers/usb/host/xhci-pci-renesas.c:4: include/linux/unaligned/le_struct.h:7:19: note: previous definition of 'get_unaligned_le16' was here 7 | static inline u16 get_unaligned_le16(const void *p) | ^~~~~~~~~~~~~~~~~~ In file included from drivers/usb/host/xhci-pci-renesas.c:9: include/linux/unaligned/access_ok.h:13:28: error: redefinition of 'get_unaligned_le32' 13 | static __always_inline u32 get_unaligned_le32(const void *p) | ^~~~~~~~~~~~~~~~~~ In file included from arch/ia64/include/asm/unaligned.h:5, from arch/ia64/include/asm/io.h:23, from arch/ia64/include/asm/smp.h:21, from include/linux/smp.h:67, 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/of.h:17, from include/linux/irqdomain.h:35, from include/linux/acpi.h:13, from drivers/usb/host/xhci-pci-renesas.c:4: include/linux/unaligned/le_struct.h:12:19: note: previous definition of 'get_unaligned_le32' was here Fixes: 8bd5741e ("usb: renesas-xhci: Add the renesas xhci driver") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20200516162516.385149-1-vkoul@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
357abc1d