diff mbox series

[2/3] imx: hab: Make usage of packed attribute consistent

Message ID 1520600841-8810-3-git-send-email-bryan.odonoghue@linaro.org
State Accepted
Commit f0d5bd4ba54862190f87295cc5a59e35a1e302c4
Headers show
Series HAB Fixes for 2018.03-rc4 | expand

Commit Message

Bryan O'Donoghue March 9, 2018, 1:07 p.m. UTC
commit cd2d46003ce1 ("arm: imx: hab: Add IVT header definitions") declares
struct ivt_header as "__attribute__((packed))".

commit ed286bc80e9d ("imx: hab: Check if CSF is valid before
authenticating image") declares struct hab_hdr with __packed.

This patch makes the __packed convention consistent.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
---
 arch/arm/include/asm/mach-imx/hab.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Fabio Estevam March 10, 2018, 12:46 a.m. UTC | #1
On Fri, Mar 9, 2018 at 10:07 AM, Bryan O'Donoghue
<bryan.odonoghue@linaro.org> wrote:
> commit cd2d46003ce1 ("arm: imx: hab: Add IVT header definitions") declares
> struct ivt_header as "__attribute__((packed))".
>
> commit ed286bc80e9d ("imx: hab: Check if CSF is valid before
> authenticating image") declares struct hab_hdr with __packed.
>
> This patch makes the __packed convention consistent.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Cc: Utkarsh Gupta <utkarsh.gupta@nxp.com>
> Cc: Breno Lima <breno.lima@nxp.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
diff mbox series

Patch

diff --git a/arch/arm/include/asm/mach-imx/hab.h b/arch/arm/include/asm/mach-imx/hab.h
index a522cba..ce9a44d 100644
--- a/arch/arm/include/asm/mach-imx/hab.h
+++ b/arch/arm/include/asm/mach-imx/hab.h
@@ -22,11 +22,11 @@ 
 #define IVT_HEADER_V1		0x40
 #define IVT_HEADER_V2		0x41
 
-struct ivt_header {
+struct __packed ivt_header {
 	uint8_t		magic;
 	uint16_t	length;
 	uint8_t		version;
-} __attribute__((packed));
+};
 
 struct ivt {
 	struct ivt_header hdr;	/* IVT header above */