* [PATCH] firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able()
@ 2024-03-08 9:25 Gabor Juhos
2024-03-08 22:00 ` Konrad Dybcio
2024-03-17 16:27 ` Bjorn Andersson
0 siblings, 2 replies; 3+ messages in thread
From: Gabor Juhos @ 2024-03-08 9:25 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio; +Cc: linux-arm-msm, linux-kernel, Gabor Juhos
Since the qcom_scm_probe() function returns with an error if
__scm->path contains an error pointer, it is not needed to
verify that again in the qcom_scm_bw_{en,dis}able() functions
so remove the superfluous IS_ERR() checks.
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
Based on v6.8-rc7.
---
drivers/firmware/qcom/qcom_scm.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 520de9b5633ab..a3bfe7de0bfd7 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -163,9 +163,6 @@ static int qcom_scm_bw_enable(void)
if (!__scm->path)
return 0;
- if (IS_ERR(__scm->path))
- return -EINVAL;
-
mutex_lock(&__scm->scm_bw_lock);
if (!__scm->scm_vote_count) {
ret = icc_set_bw(__scm->path, 0, UINT_MAX);
@@ -183,7 +180,7 @@ static int qcom_scm_bw_enable(void)
static void qcom_scm_bw_disable(void)
{
- if (IS_ERR_OR_NULL(__scm->path))
+ if (!__scm->path)
return;
mutex_lock(&__scm->scm_bw_lock);
---
base-commit: 90d35da658da8cff0d4ecbb5113f5fac9d00eb72
change-id: 20240308-qcom_scm-is_err-check-96a5cc6f17cf
Best regards,
--
Gabor Juhos <j4g8y7@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able()
2024-03-08 9:25 [PATCH] firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able() Gabor Juhos
@ 2024-03-08 22:00 ` Konrad Dybcio
2024-03-17 16:27 ` Bjorn Andersson
1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2024-03-08 22:00 UTC (permalink / raw)
To: Gabor Juhos, Bjorn Andersson; +Cc: linux-arm-msm, linux-kernel
On 8.03.2024 10:25, Gabor Juhos wrote:
> Since the qcom_scm_probe() function returns with an error if
> __scm->path contains an error pointer, it is not needed to
> verify that again in the qcom_scm_bw_{en,dis}able() functions
> so remove the superfluous IS_ERR() checks.
>
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> ---
> Based on v6.8-rc7.
> ---
LGTM
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able()
2024-03-08 9:25 [PATCH] firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able() Gabor Juhos
2024-03-08 22:00 ` Konrad Dybcio
@ 2024-03-17 16:27 ` Bjorn Andersson
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2024-03-17 16:27 UTC (permalink / raw)
To: Konrad Dybcio, Gabor Juhos; +Cc: linux-arm-msm, linux-kernel
On Fri, 08 Mar 2024 10:25:07 +0100, Gabor Juhos wrote:
> Since the qcom_scm_probe() function returns with an error if
> __scm->path contains an error pointer, it is not needed to
> verify that again in the qcom_scm_bw_{en,dis}able() functions
> so remove the superfluous IS_ERR() checks.
>
>
Applied, thanks!
[1/1] firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able()
commit: e6f3dac9cf11eff1daddeaa69521370c8941a5f9
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-17 16:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 9:25 [PATCH] firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able() Gabor Juhos
2024-03-08 22:00 ` Konrad Dybcio
2024-03-17 16:27 ` Bjorn Andersson
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®