From: Luca Weiss <luca@lucaweiss.eu>
To: ~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org,
Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2] rpmsg: qcom_smd: Improve error handling for qcom_smd_parse_edge
Date: Mon, 17 Mar 2025 18:06:07 +0100 [thread overview]
Message-ID: <92efa0ac-cdce-4ea2-ab08-b756dc755432@lucaweiss.eu> (raw)
In-Reply-To: <2827287.mvXUDI8C0e@g550jk>
On 10/19/24 12:06 PM, Luca Weiss wrote:
> On Donnerstag, 6. Juni 2024 21:01:36 MESZ Luca Weiss wrote:
>> When the mailbox driver has not probed yet, the error message "failed to
>> parse smd edge" is just going to confuse users, so improve the error
>> prints a bit.
>>
>> Cover the last remaining exits from qcom_smd_parse_edge with proper
>> error prints, especially the one for the mbox_chan deserved
>> dev_err_probe to handle EPROBE_DEFER nicely. And add one for ipc_regmap
>> also to be complete.
>>
>> With this done, we can remove the outer print completely.
>
> Ping, looks like this is still pending.
Ping again, still pending.
Regards
Luca
>
> Regards
> Luca
>
>>
>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
>> ---
>> Changes in v2:
>> - Rebase on qcom for-next, drop dts patches which have been applied
>> - Improve error printing situation (Bjorn)
>> - Link to v1: https://lore.kernel.org/r/20240424-apcs-mboxes-v1-0-6556c47cb501@z3ntu.xyz
>> ---
>> drivers/rpmsg/qcom_smd.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
>> index 43f601c84b4f..06e6ba653ea1 100644
>> --- a/drivers/rpmsg/qcom_smd.c
>> +++ b/drivers/rpmsg/qcom_smd.c
>> @@ -1369,7 +1369,8 @@ static int qcom_smd_parse_edge(struct device *dev,
>> edge->mbox_chan = mbox_request_channel(&edge->mbox_client, 0);
>> if (IS_ERR(edge->mbox_chan)) {
>> if (PTR_ERR(edge->mbox_chan) != -ENODEV) {
>> - ret = PTR_ERR(edge->mbox_chan);
>> + ret = dev_err_probe(dev, PTR_ERR(edge->mbox_chan),
>> + "failed to acquire IPC mailbox\n");
>> goto put_node;
>> }
>>
>> @@ -1386,6 +1387,7 @@ static int qcom_smd_parse_edge(struct device *dev,
>> of_node_put(syscon_np);
>> if (IS_ERR(edge->ipc_regmap)) {
>> ret = PTR_ERR(edge->ipc_regmap);
>> + dev_err(dev, "failed to get regmap from syscon: %d\n", ret);
>> goto put_node;
>> }
>>
>> @@ -1501,10 +1503,8 @@ struct qcom_smd_edge *qcom_smd_register_edge(struct device *parent,
>> }
>>
>> ret = qcom_smd_parse_edge(&edge->dev, node, edge);
>> - if (ret) {
>> - dev_err(&edge->dev, "failed to parse smd edge\n");
>> + if (ret)
>> goto unregister_dev;
>> - }
>>
>> ret = qcom_smd_create_chrdev(edge);
>> if (ret) {
>>
>> ---
>> base-commit: 2c79712cc83b172ce26c3086ced1c1fae087d8fb
>> change-id: 20240423-apcs-mboxes-12ee6c01a5b3
>>
>> Best regards,
>>
>
>
>
>
prev parent reply other threads:[~2025-03-17 17:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 19:01 [PATCH v2] rpmsg: qcom_smd: Improve error handling for qcom_smd_parse_edge Luca Weiss
2024-06-07 11:53 ` Dmitry Baryshkov
2024-10-19 10:06 ` Luca Weiss
2025-03-17 17:06 ` Luca Weiss [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92efa0ac-cdce-4ea2-ab08-b756dc755432@lucaweiss.eu \
--to=luca@lucaweiss.eu \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox