Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: fsl-dpaa2-qdma: Add dpdmai_cmd_open

Introduce the structures dpdmai_cmd_open to maintain consistency within the
API calls of the driver.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240320-dpaa2-v1-3-eb56e47c94ec@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Frank Li and committed by
Vinod Koul
ebf85069 26a4d2ae

+7 -3
+7 -3
drivers/dma/fsl-dpaa2-qdma/dpdmai.c
··· 33 33 __le32 fqid; 34 34 }; 35 35 36 + struct dpdmai_cmd_open { 37 + __le32 dpdmai_id; 38 + } __packed; 39 + 36 40 static inline u64 mc_enc(int lsoffset, int width, u64 val) 37 41 { 38 42 return (val & MAKE_UMASK64(width)) << lsoffset; ··· 62 58 int dpdmai_open(struct fsl_mc_io *mc_io, u32 cmd_flags, 63 59 int dpdmai_id, u16 *token) 64 60 { 61 + struct dpdmai_cmd_open *cmd_params; 65 62 struct fsl_mc_command cmd = { 0 }; 66 - __le64 *cmd_dpdmai_id; 67 63 int err; 68 64 69 65 /* prepare command */ 70 66 cmd.header = mc_encode_cmd_header(DPDMAI_CMDID_OPEN, 71 67 cmd_flags, 0); 72 68 73 - cmd_dpdmai_id = cmd.params; 74 - *cmd_dpdmai_id = cpu_to_le32(dpdmai_id); 69 + cmd_params = (struct dpdmai_cmd_open *)&cmd.params; 70 + cmd_params->dpdmai_id = cpu_to_le32(dpdmai_id); 75 71 76 72 /* send command to mc*/ 77 73 err = mc_send_command(mc_io, &cmd);