lkml.org 
[lkml]   [2023]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V8 2/2] firmware: qcom: scm: Add wait-queue handling logic
From


On 11/01/2023 10:17, Sibi Sankar wrote:
> +static int qcom_scm_waitq_wakeup(struct qcom_scm *scm, unsigned int wq_ctx, bool wake_all)
> +{
> + int ret;
> +
> + ret = qcom_scm_assert_valid_wq_ctx(wq_ctx);
> + if (ret)
> + return ret;
> +
> + if (wake_all)
> + complete_all(&__scm->waitq_comp);

As you explained in v7 that there will be only one caller at any point
in time and that will be synchronous, so complete_all here is a dead
code, isn't it?

Adding complete_all here is missleading and will require reinit
completion in case you want to reuse the same completion.

AFAIU, you should remove support to wake_all in this patchset and add it
when we really can do multiple scm calls simultaneously.

--srini

--srini
> + else
> + complete(&__scm->waitq_comp);
> +

\
 
 \ /
  Last update: 2023-03-26 23:36    [W:0.048 / U:2.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site