mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kuldeep Singh <quic_kuldsing@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Qingqing Zhou <quic_qqzhou@quicinc.com>
Subject: Re: [PATCH 1/2] firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling
Date: Mon, 7 Oct 2024 03:31:15 +0530	[thread overview]
Message-ID: <9c8ae6ef-dd71-4a2f-91c7-49eddd36e4f7@quicinc.com> (raw)
In-Reply-To: <2fi7pyhpetqyhipjiihuafddggwdrh7abuvfkks5hu5qid2rfm@ibuiecrhijey>


>>  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

  reply	other threads:[~2024-10-06 22:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-05 14:01 [PATCH 0/2] qcom_tzmem: Enhance Error Handling for shmbridge Kuldeep Singh
2024-10-05 14:01 ` [PATCH 1/2] firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling Kuldeep Singh
2024-10-06 17:35   ` Dmitry Baryshkov
2024-10-06 22:01     ` Kuldeep Singh [this message]
2024-10-07 18:11     ` Mukesh Ojha
2024-10-07  1:40   ` Bjorn Andersson
2024-10-07 20:40     ` Kuldeep Singh
2024-10-07 21:45       ` Bjorn Andersson
2024-10-05 14:01 ` [PATCH 2/2] firmware: qcom: qcom_tzmem: Implement sanity checks Kuldeep Singh
2024-10-06 19:30   ` Dmitry Baryshkov
2024-10-07 19:17     ` Kuldeep Singh
2024-10-07 20:13       ` Dmitry Baryshkov
2024-10-07 20:44         ` Kuldeep Singh
2024-10-07 20:56           ` Bartosz Golaszewski
2024-10-07  1:18   ` Bjorn Andersson
2024-10-07 14:23     ` Bartosz Golaszewski
2024-10-07 19:23       ` Kuldeep Singh
2024-10-07 14:25 ` [PATCH 0/2] qcom_tzmem: Enhance Error Handling for shmbridge Bartosz Golaszewski
2024-10-07 19:35   ` Kuldeep Singh

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=9c8ae6ef-dd71-4a2f-91c7-49eddd36e4f7@quicinc.com \
    --to=quic_kuldsing@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_qqzhou@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®