RE: [PATCH] soc: qcom: smsm: Don't log an error for hosts without a mailbox

From: Alexandre Rapaille

Date: Tue Dec 01 2026 - 12:13:20 EST


>> + /* Hosts without a mailbox have a null or no entry: fall back quietly */
>> + ret = of_parse_phandle_with_args(smsm->dev->of_node, "mboxes", "#mbox-cells",
>> + host_id, &args);
>> + if (ret)
>> + return ret;
>> + of_node_put(args.np);
>>
>> host->mbox_chan = mbox_request_channel(&smsm->mbox_client, host_id);
>
> Would the above returning -ENOENT not mean the same?

It does, mbox_request_channel() returns the same -ENOENT. But it calls
dev_err() before returning, so by the time smsm sees the error the line
is already in the log:

ret = fwnode_property_get_reference_args(fwnode, "mboxes", "#mbox-cells",
0, index, &fwspec);
if (ret) {
dev_err(dev, "%s: can't parse \"%s\" property\n", __func__, "mboxes");
return ERR_PTR(ret);
}

The other option is to make that dev_err() quiet for -ENOENT in the
mailbox core. That changes it for every client, so I kept the check in
smsm. I can do it in the core instead if you prefer.