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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Regards,
Bjorn



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux