Re: [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol

Dan Carpenter
2025-03-03T08:03:24Z

On Mon, Mar 03, 2025 at 10:53:24AM +0800, Peng Fan (OSS) wrote:
> +static int scmi_imx_lmm_attributes(const struct scmi_protocol_handle *ph,
> + u32 lmid, struct scmi_imx_lmm_info *info)
> +{
> + struct scmi_msg_imx_lmm_attributes_out *out;
> + struct scmi_xfer *t;
> + int ret;
> +
> + ret = ph->xops->xfer_get_init(ph, SCMI_IMX_LMM_ATTRIBUTES, sizeof(u32), 0, &t);
> + if (ret)
> + return ret;
> +
> + put_unaligned_le32(lmid, t->tx.buf);
> + ret = ph->xops->do_xfer(ph, t);
> + if (!ret) {
> + out = t->rx.buf;
> + info->lmid = le32_to_cpu(out->lmid);
> + info->state = le32_to_cpu(out->state);
> + info->errstatus = le32_to_cpu(out->errstatus);
> + strscpy(info->name, out->name);
> + dev_dbg(ph->dev, "i.MX LMM: Logical Machine(%d), name: %s\n",
> + info->lmid, out->name);

Print info->name instead of out->name.

> + } else {
> + dev_err(ph->dev, "i.MX LMM: Failed to get info of Logical Machine(%u)\n", lmid);
> + }
> +
> + ph->xops->xfer_put(ph, t);
> +
> + return ret;
> +}

regards,
dan carpenter