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

From: Konrad Dybcio

Date: Wed Dec 02 2026 - 10:27:26 EST


On 12/1/26 6:13 PM, Alexandre Rapaille wrote:
>>> + /* 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.

I think something like an _optional variant in the mbox core
would make sense here

Konrad