Skip to content

Commit d693eb3

Browse files
IoanaCiorneigregkh
authored andcommitted
bus: fsl-mc: explicitly define the fsl_mc_command endianness
Both the header and the command parameters of the fsl_mc_command are 64-bit little-endian words. Use the appropriate type to explicitly specify their endianness. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4b4bdfe commit d693eb3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • include/linux/fsl

‎include/linux/fsl/mc.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ struct mc_cmd_header {
210210
};
211211

212212
struct fsl_mc_command {
213-
u64 header;
214-
u64 params[MC_CMD_NUM_OF_PARAMS];
213+
__le64 header;
214+
__le64 params[MC_CMD_NUM_OF_PARAMS];
215215
};
216216

217217
enum mc_cmd_status {
@@ -238,11 +238,11 @@ enum mc_cmd_status {
238238
/* Command completion flag */
239239
#define MC_CMD_FLAG_INTR_DIS 0x01
240240

241-
static inline u64 mc_encode_cmd_header(u16 cmd_id,
242-
u32 cmd_flags,
243-
u16 token)
241+
static inline __le64 mc_encode_cmd_header(u16 cmd_id,
242+
u32 cmd_flags,
243+
u16 token)
244244
{
245-
u64 header = 0;
245+
__le64 header = 0;
246246
struct mc_cmd_header *hdr = (struct mc_cmd_header *)&header;
247247

248248
hdr->cmd_id = cpu_to_le16(cmd_id);

0 commit comments

Comments
 (0)