Skip to content

Commit d5cc098

Browse files
krzkbroonie
authored andcommitted
regulator: da9121: Fix Wvoid-pointer-to-enum-cast warning
'subvariant_id' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: da9121-regulator.c:1132:24: error: cast to smaller integer type 'enum da9121_subvariant' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250509142448.257199-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent f1471bc commit d5cc098

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/da9121-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ static int da9121_i2c_probe(struct i2c_client *i2c)
11291129
}
11301130

11311131
chip->pdata = i2c->dev.platform_data;
1132-
chip->subvariant_id = (enum da9121_subvariant)i2c_get_match_data(i2c);
1132+
chip->subvariant_id = (kernel_ulong_t)i2c_get_match_data(i2c);
11331133

11341134
ret = da9121_assign_chip_model(i2c, chip);
11351135
if (ret < 0)

0 commit comments

Comments
 (0)