[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200514142924.GC23401@bogus>
Date: Thu, 14 May 2020 15:29:24 +0100
From: Sudeep Holla <sudeep.holla@....com>
To: Etienne Carriere <etienne.carriere@...aro.org>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Sudeep Holla <sudeep.holla@....com>
Subject: Re: [PATCH] firmware: arm_scmi: fix SMCCC_RET_NOT_SUPPORTED
management
On Thu, May 14, 2020 at 10:24:28AM +0200, Etienne Carriere wrote:
> 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.
>
I agree on the comment part, but ...
> Signed-off-by: Etienne Carriere <etienne.carriere@...aro.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;
Now this will return 0 for all values other than SMCCC_RET_NOT_SUPPORTED.
Is that what we need ? Or do you see non-zero res.a0 for a success case ?
If later, we need some fixing, otherwise it is safer to leave it as is
IMO.
--
Regards,
Sudeep
Powered by blists - more mailing lists