lkml.org 
[lkml]   [2020]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] staging: dpaa2-switch: pack the firmware command structures
Date
From: Ioana Ciornei <ioana.ciornei@nxp.com>

The structures defined in the dpsw-cmd.h header file describe exactly
the layout of commands accepted by the MC firmware. Make sure that all
these structures are packed.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h b/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
index c9fb688f387c..450841cc6ca8 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
+++ b/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
@@ -86,6 +86,7 @@
#define dpsw_get_bit(var, bit) \
(((var) >> (bit)) & GENMASK(0, 0))

+#pragma pack(push, 1)
struct dpsw_cmd_open {
__le32 dpsw_id;
};
@@ -385,4 +386,5 @@ struct dpsw_cmd_if_set_mac_addr {
u8 mac_addr[6];
};

+#pragma pack(pop)
#endif /* __FSL_DPSW_CMD_H */
--
2.28.0
\
 
 \ /
  Last update: 2020-11-19 17:51    [W:2.676 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site