[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e4ad0e8-9fdf-6af8-f591-be27168460ae@linaro.org>
Date: Mon, 22 May 2023 18:27:02 +0200
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Min-Hua Chen <minhuadotchen@...il.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] soc: qcom: rpmpd: use correct __le32 type
On 22.05.2023 18:07, Min-Hua Chen wrote:
> Use cpu_to_le32 to cast constants to __le32 before comparing
> them with __le32 type pd->key. This fixes the following sparse
> warnings:
>
> drivers/soc/qcom/rpmpd.c:895:31: sparse: warning: restricted __le32 degrades to integer
> drivers/soc/qcom/rpmpd.c:896:15: sparse: warning: restricted __le32 degrades to integer
>
> Signed-off-by: Min-Hua Chen <minhuadotchen@...il.com>
> ---
I wonder if our drivers are capable of booting and working properly
in BE..
Reviewed-by: Konrad Dybcio <konrad.dybcio@...aro.org>
Konrad
> drivers/soc/qcom/rpmpd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
> index f8397dcb146c..99b017fd76b7 100644
> --- a/drivers/soc/qcom/rpmpd.c
> +++ b/drivers/soc/qcom/rpmpd.c
> @@ -892,8 +892,8 @@ static int rpmpd_set_performance(struct generic_pm_domain *domain,
> pd->corner = state;
>
> /* Always send updates for vfc and vfl */
> - if (!pd->enabled && pd->key != KEY_FLOOR_CORNER &&
> - pd->key != KEY_FLOOR_LEVEL)
> + if (!pd->enabled && pd->key != cpu_to_le32(KEY_FLOOR_CORNER) &&
> + pd->key != cpu_to_le32(KEY_FLOOR_LEVEL))
> goto out;
>
> ret = rpmpd_aggregate_corner(pd);
Powered by blists - more mailing lists