mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Rapaille via B4 Relay <devnull+arapaille.atlr-engineering.com@kernel.org>
To: Jassi Brar <jassisinghbrar@gmail.com>,
	 Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>,  Luca Weiss <luca@lucaweiss.eu>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Alexandre Rapaille <arapaille@atlr-engineering.com>
Subject: [PATCH v2 2/2] soc: qcom: smsm: Don't log an error for hosts without a mailbox
Date: Thu, 03 Dec 2026 11:57:01 +0100	[thread overview]
Message-ID: <20261203-smsm-null-mbox-v2-2-b4b6e224b127@atlr-engineering.com> (raw)
In-Reply-To: <20261203-smsm-null-mbox-v2-0-b4b6e224b127@atlr-engineering.com>

From: Alexandre Rapaille <arapaille@atlr-engineering.com>

smsm_parse_mbox() calls mbox_request_channel() for every host, so the
mailbox core logs an error for each host that has no mailbox before smsm
falls back to qcom,ipc. On msm8974 SMEM reports 5 hosts while mboxes has
4 entries, the first a null placeholder for the local host, so every
boot prints twice:

  qcom-smsm smsm: mbox_request_channel: can't parse "mboxes" property

Use mbox_request_channel_optional() and fall back quietly when the entry
is null or missing.

Tested on a Fairphone 2 with next-20261127: both lines are gone, hosts
1-3 still get their mailbox channel, and the modem comes back after
forced restarts.

Signed-off-by: Alexandre Rapaille <arapaille@atlr-engineering.com>
---
 drivers/soc/qcom/smsm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c
index f6b7266a5af0..9623146da8c7 100644
--- a/drivers/soc/qcom/smsm.c
+++ b/drivers/soc/qcom/smsm.c
@@ -370,10 +370,12 @@ static int smsm_parse_mbox(struct qcom_smsm *smsm, unsigned int host_id)
 	struct smsm_host *host = &smsm->hosts[host_id];
 	int ret = 0;
 
-	host->mbox_chan = mbox_request_channel(&smsm->mbox_client, host_id);
+	host->mbox_chan = mbox_request_channel_optional(&smsm->mbox_client, host_id);
 	if (IS_ERR(host->mbox_chan)) {
 		ret = PTR_ERR(host->mbox_chan);
 		host->mbox_chan = NULL;
+	} else if (!host->mbox_chan) {
+		ret = -ENOENT;
 	}
 
 	return ret;

-- 
2.43.0



  parent reply	other threads:[~2026-12-03 10:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 10:56 [PATCH v2 0/2] " Alexandre Rapaille via B4 Relay
2026-12-03 10:57 ` [PATCH v2 1/2] mailbox: Add mbox_request_channel_optional() Alexandre Rapaille via B4 Relay
2026-12-03 11:37   ` Konrad Dybcio
2026-12-03 10:57 ` Alexandre Rapaille via B4 Relay [this message]
2026-12-03 11:45   ` [PATCH v2 2/2] soc: qcom: smsm: Don't log an error for hosts without a mailbox Konrad Dybcio

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=20261203-smsm-null-mbox-v2-2-b4b6e224b127@atlr-engineering.com \
    --to=devnull+arapaille.atlr-engineering.com@kernel.org \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=arapaille@atlr-engineering.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca@lucaweiss.eu \
    /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

all inboxes | Powered by JetHome®