Re: [PATCH 1/3] soc: qcom: rpmh-rsc: Remove tcs_is_free() API

From: Stephen Boyd
Date: Fri Apr 24 2020 - 13:21:58 EST


Quoting Bjorn Andersson (2020-04-23 22:36:26)
> On Thu 23 Apr 21:54 PDT 2020, Stephen Boyd wrote:
> > diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
> [..]
> > static int find_free_tcs(struct tcs_group *tcs)
> > {
> > - int i;
> > + const struct rsc_drv *drv = tcs->drv;
> > + unsigned long i;
> >
> > - for (i = 0; i < tcs->num_tcs; i++) {
> > - if (tcs_is_free(tcs->drv, tcs->offset + i))
> > - return tcs->offset + i;
> > - }
> > + i = find_next_zero_bit(drv->tcs_in_use, MAX_TCS_NR, tcs->offset);
> > + if (i > tcs->offset + tcs->num_tcs)
>
> Afaict this should be >=
>

Thanks!