From: Ioana Ciornei <ciorneiioana@gmail.com>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: [PATCH 3/3] staging: dpaa2-switch: pack the firmware command structures
Date: Thu, 19 Nov 2020 18:50:17 +0200 [thread overview]
Message-ID: <20201119165017.806696-4-ciorneiioana@gmail.com> (raw)
In-Reply-To: <20201119165017.806696-1-ciorneiioana@gmail.com>
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
prev parent reply other threads:[~2020-11-19 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 16:50 [PATCH 0/3] staging: dpaa2-switch: small updates and fixes Ioana Ciornei
2020-11-19 16:50 ` [PATCH 1/3] staging: dpaa2-switch: export the 'no buffer' counter in ethtool Ioana Ciornei
2020-11-19 16:50 ` [PATCH 2/3] staging: dpaa2-switch: make sure that the VLAN is not already configured Ioana Ciornei
2020-11-19 16:50 ` Ioana Ciornei [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201119165017.806696-4-ciorneiioana@gmail.com \
--to=ciorneiioana@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=ioana.ciornei@nxp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®