]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check
authorLee Jones <lee.jones@linaro.org>
Fri, 26 Jun 2020 06:57:36 +0000 (07:57 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 26 Jun 2020 14:34:23 +0000 (15:34 +0100)
commitf8169e45cc82c8ae24f3f1bcca2485b92138ba28
treece9097fbb1e16a233c49b3320dc587d973ca089c
parent1e6ce0b59323ace8dde8a22082ea19556586d5b5
regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check

'rid' is declared as unsigned int, so there is little point checking for <0.

Removing these checks fixes the following W=1 warnings:

 drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_enable’:
 drivers/regulator/tps65218-regulator.c:131:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 131 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
 | ^
 drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_disable’:
 drivers/regulator/tps65218-regulator.c:144:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 144 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
 | ^

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Dave Gerlach <d-gerlach@ti.com>
Cc: linux-omap@vger.kernel.org
Link: https://lore.kernel.org/r/20200626065738.93412-8-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/tps65218-regulator.c