Unverified Commit d5cc0984 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown
Browse files

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250509142448.257199-2-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f1471bc4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1129,7 +1129,7 @@ static int da9121_i2c_probe(struct i2c_client *i2c)
	}

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

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