Skip to content

Commit 3395d36

Browse files
krzkandersson
authored andcommitted
soc: qcom: rpmh-rsc: drop redundant unsigned >=0 comparision
Unsigned int "minor" is always >= 0 as reported by Smatch: drivers/soc/qcom/rpmh-rsc.c:1076 rpmh_rsc_probe() warn: always true condition '(drv->ver.minor >= 0) => (0-u32max >= 0)' Fixes: 88704a0 ("soc: qcom: rpmh-rsc: Support RSC v3 minor versions") Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3530167 commit 3395d36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/qcom/rpmh-rsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
10731073
drv->ver.minor = rsc_id & (MINOR_VER_MASK << MINOR_VER_SHIFT);
10741074
drv->ver.minor >>= MINOR_VER_SHIFT;
10751075

1076-
if (drv->ver.major == 3 && drv->ver.minor >= 0)
1076+
if (drv->ver.major == 3)
10771077
drv->regs = rpmh_rsc_reg_offset_ver_3_0;
10781078
else
10791079
drv->regs = rpmh_rsc_reg_offset_ver_2_7;

0 commit comments

Comments
 (0)