* [PATCH 1/1] sunxi: remove __packed from struct sunxi_prcm_reg
@ 2019-12-17 21:55 Heinrich Schuchardt
2019-12-18 14:49 ` Jagan Teki
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2019-12-17 21:55 UTC (permalink / raw)
To: u-boot
struct sunxi_prcm_reg is naturally packed. There is no need to define it as
packed. Defining it as packed leads to compilation errors with GCC 9.2.1:
CC arch/arm/lib/reloc_arm_efi.o
arch/arm/cpu/armv7/sunxi/psci.c: In function ‘sunxi_cpu_set_power’:
:qarch/arm/cpu/armv7/sunxi/psci.c:163:21: error: taking address of packed
member of ‘struct sunxi_prcm_reg’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
163 | sunxi_power_switch(&prcm->cpu_pwr_clamp[cpu], &prcm->cpu_pwroff,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Remove __packed attribute from struct sunxi_prcm_reg.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
arch/arm/include/asm/arch-sunxi/prcm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/arch-sunxi/prcm.h b/arch/arm/include/asm/arch-sunxi/prcm.h
index 58a36895e6..767d1ff98d 100644
--- a/arch/arm/include/asm/arch-sunxi/prcm.h
+++ b/arch/arm/include/asm/arch-sunxi/prcm.h
@@ -202,7 +202,7 @@
#ifndef __ASSEMBLY__
#include <linux/compiler.h>
-struct __packed sunxi_prcm_reg {
+struct sunxi_prcm_reg {
u32 cpus_cfg; /* 0x000 */
u8 res0[0x8]; /* 0x004 */
u32 apb0_ratio; /* 0x00c */
--
2.24.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 1/1] sunxi: remove __packed from struct sunxi_prcm_reg
2019-12-17 21:55 [PATCH 1/1] sunxi: remove __packed from struct sunxi_prcm_reg Heinrich Schuchardt
@ 2019-12-18 14:49 ` Jagan Teki
0 siblings, 0 replies; 2+ messages in thread
From: Jagan Teki @ 2019-12-18 14:49 UTC (permalink / raw)
To: u-boot
On Wed, Dec 18, 2019 at 3:25 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> struct sunxi_prcm_reg is naturally packed. There is no need to define it as
> packed. Defining it as packed leads to compilation errors with GCC 9.2.1:
>
> CC arch/arm/lib/reloc_arm_efi.o
> arch/arm/cpu/armv7/sunxi/psci.c: In function ‘sunxi_cpu_set_power’:
> :qarch/arm/cpu/armv7/sunxi/psci.c:163:21: error: taking address of packed
> member of ‘struct sunxi_prcm_reg’ may result in an unaligned pointer value
> [-Werror=address-of-packed-member]
> 163 | sunxi_power_switch(&prcm->cpu_pwr_clamp[cpu], &prcm->cpu_pwroff,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Remove __packed attribute from struct sunxi_prcm_reg.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
Applied to u-boot-sunxi/master
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-18 14:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 21:55 [PATCH 1/1] sunxi: remove __packed from struct sunxi_prcm_reg Heinrich Schuchardt
2019-12-18 14:49 ` Jagan Teki
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.