From: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Dmitry Baryshkov <lumag@kernel.org>,
Chris Lew <quic_clew@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Subject: [PATCH v2 2/2] soc: qcom: qmi: Print error codes in failure paths
Date: Mon, 2 Feb 2026 16:06:41 +0530 [thread overview]
Message-ID: <20260202103641.3003867-2-mukesh.ojha@oss.qualcomm.com> (raw)
In-Reply-To: <20260202103641.3003867-1-mukesh.ojha@oss.qualcomm.com>
Few error paths in the qmi_interface module log a failure message but
do not include the actual error code. Include the error value in the log
so debugging failures becomes easier.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
---
Changes in v2:
- Rebased it and added R-b tag.
drivers/soc/qcom/qmi_interface.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/soc/qcom/qmi_interface.c b/drivers/soc/qcom/qmi_interface.c
index 6500f863aae5..941612b1bd2e 100644
--- a/drivers/soc/qcom/qmi_interface.c
+++ b/drivers/soc/qcom/qmi_interface.c
@@ -321,7 +321,7 @@ int qmi_txn_init(struct qmi_handle *qmi, struct qmi_txn *txn,
mutex_lock(&qmi->txn_lock);
ret = idr_alloc_cyclic(&qmi->txns, txn, 0, U16_MAX, GFP_KERNEL);
if (ret < 0)
- pr_err("failed to allocate transaction id\n");
+ pr_err("failed to allocate transaction id: %d\n", ret);
txn->id = ret;
mutex_unlock(&qmi->txn_lock);
@@ -413,7 +413,7 @@ static void qmi_invoke_handler(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,
ret = qmi_decode_message(buf, len, handler->ei, dest);
if (ret < 0)
- pr_err("failed to decode incoming message\n");
+ pr_err("failed to decode incoming message: %d\n", ret);
else
handler->fn(qmi, sq, txn, dest);
@@ -502,7 +502,7 @@ static void qmi_handle_message(struct qmi_handle *qmi,
if (txn->dest && txn->ei) {
ret = qmi_decode_message(buf, len, txn->ei, txn->dest);
if (ret < 0)
- pr_err("failed to decode incoming message\n");
+ pr_err("failed to decode incoming message: %d\n", ret);
txn->result = ret;
complete(&txn->completion);
@@ -661,8 +661,8 @@ int qmi_handle_init(struct qmi_handle *qmi, size_t recv_buf_size,
if (PTR_ERR(qmi->sock) == -EAFNOSUPPORT) {
ret = -EPROBE_DEFER;
} else {
- pr_err("failed to create QMI socket\n");
ret = PTR_ERR(qmi->sock);
+ pr_err("failed to create QMI socket: %d\n", ret);
}
goto err_destroy_wq;
}
@@ -766,7 +766,7 @@ static ssize_t qmi_send_message(struct qmi_handle *qmi,
if (qmi->sock) {
ret = kernel_sendmsg(qmi->sock, &msghdr, &iv, 1, len);
if (ret < 0)
- pr_err("failed to send QMI message\n");
+ pr_err("failed to send QMI message: %d\n", ret);
} else {
ret = -EPIPE;
}
--
2.50.1
next prev parent reply other threads:[~2026-02-02 10:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 10:36 [PATCH v2 1/2] soc: qcom: pd-mapper: Fix element length in servreg_loc_pfr_req_ei Mukesh Ojha
2026-02-02 10:36 ` Mukesh Ojha [this message]
2026-03-04 20:07 ` Bjorn Andersson
2026-03-06 17:59 ` Mukesh Ojha
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=20260202103641.3003867-2-mukesh.ojha@oss.qualcomm.com \
--to=mukesh.ojha@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=quic_clew@quicinc.com \
/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®