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@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230522160757.284165-1-minhuadotchen@gmail.com
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);