From: Etienne Carriere <etienne.carriere@linaro.org>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com,
etienne.carriere@linaro.org
Subject: [PATCH] firmware: arm_scmi: fix SMCCC_RET_NOT_SUPPORTED management
Date: Thu, 14 May 2020 10:24:28 +0200 [thread overview]
Message-ID: <20200514082428.27864-1-etienne.carriere@linaro.org> (raw)
Fix management of argument a0 output value of arm_smccc_1_1_invoke() that
should consider only SMCCC_RET_NOT_SUPPORTED as reporting an unsupported
function ID as correctly stated in the inline comment.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
drivers/firmware/arm_scmi/smc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c
index 49bc4b0e8428..637ad439545f 100644
--- a/drivers/firmware/arm_scmi/smc.c
+++ b/drivers/firmware/arm_scmi/smc.c
@@ -115,7 +115,7 @@ static int smc_send_message(struct scmi_chan_info *cinfo,
mutex_unlock(&scmi_info->shmem_lock);
/* Only SMCCC_RET_NOT_SUPPORTED is valid error code */
- if (res.a0)
+ if (res.a0 == SMCCC_RET_NOT_SUPPORTED)
return -EOPNOTSUPP;
return 0;
}
--
2.17.1
next reply other threads:[~2020-05-14 8:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 8:24 Etienne Carriere [this message]
2020-05-14 14:29 ` [PATCH] firmware: arm_scmi: fix SMCCC_RET_NOT_SUPPORTED management Sudeep Holla
2020-05-14 15:06 ` Etienne Carriere
2020-05-15 9:34 ` Sudeep Holla
2020-05-15 9:57 ` Etienne Carriere
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=20200514082428.27864-1-etienne.carriere@linaro.org \
--to=etienne.carriere@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.holla@arm.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;
as well as URLs for NNTP newsgroup(s).