From: Andrew Goodbody Date: Thu, 7 Aug 2025 16:35:22 +0000 (+0100) Subject: power: regulator: tps65910: Cannot test unsigned for being negative X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=58b8ff0b663a7491c1964e1e3a8d1d88ef707077;p=thirdparty%2Fu-boot.git power: regulator: tps65910: Cannot test unsigned for being negative The code in tps65910_regulator.c treats the field supply in struct tps65910_regulator_pdata as an int and even tests the value for being negative so change it from a u32 to int so that the code all works as expected. This issue was found by Smatch. Signed-off-by: Andrew Goodbody Signed-off-by: Peng Fan --- diff --git a/include/power/tps65910_pmic.h b/include/power/tps65910_pmic.h index 2026ec2f426..8fa02f33ab1 100644 --- a/include/power/tps65910_pmic.h +++ b/include/power/tps65910_pmic.h @@ -123,7 +123,7 @@ enum { /* platform data */ struct tps65910_regulator_pdata { - u32 supply; /* regulator supply voltage in uV */ + int supply; /* regulator supply voltage in uV */ uint unit; /* unit-address according to DT */ };