[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c8ae6ef-dd71-4a2f-91c7-49eddd36e4f7@quicinc.com>
Date: Mon, 7 Oct 2024 03:31:15 +0530
From: Kuldeep Singh <quic_kuldsing@...cinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
CC: Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio
<konradybcio@...nel.org>,
Bartosz Golaszewski
<bartosz.golaszewski@...aro.org>,
<linux-arm-msm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Qingqing Zhou <quic_qqzhou@...cinc.com>
Subject: Re: [PATCH 1/2] firmware: qcom: scm: Return -EOPNOTSUPP for
unsupported SHM bridge enabling
>> int qcom_scm_shm_bridge_enable(void)
>> {
>> + int ret;
>> +
>> struct qcom_scm_desc desc = {
>> .svc = QCOM_SCM_SVC_MP,
>> .cmd = QCOM_SCM_MP_SHM_BRIDGE_ENABLE,
>> @@ -1373,7 +1379,11 @@ int qcom_scm_shm_bridge_enable(void)
>> QCOM_SCM_MP_SHM_BRIDGE_ENABLE))
>> return -EOPNOTSUPP;
>>
>> - return qcom_scm_call(__scm->dev, &desc, &res) ?: res.result[0];
>> + ret = qcom_scm_call(__scm->dev, &desc, &res);
>> + if (!ret && res.result[0] == SHMBRIDGE_RESULT_NOTSUPP)
>> + return -EOPNOTSUPP;
>> +
>> + return ret ?: res.result[0];
>
> Could you please make it less cryptic?
>
> if (ret)
> return ret;
>
> if (res.result[0] == SHMBRIDGE_RESULT_NOTSUPP)
> return -EOPNOTSUPP;
>
> return res.result[0];
Sure Dmitry, this looks more cleaner.
Will update in next rev.
--
Regards
Kuldeep
Powered by blists - more mailing lists