Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: wm8904: Fix Wvoid-pointer-to-enum-cast warning

'devtype' is an enum, thus cast of pointer on 64-bit compile test with
W=1 causes:

wm8904.c:2205:21: error: cast to smaller integer type 'enum wm8904_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230815143204.379708-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
5a180332 66de320b

+1 -1
+1 -1
sound/soc/codecs/wm8904.c
··· 2202 2202 match = of_match_node(wm8904_of_match, i2c->dev.of_node); 2203 2203 if (match == NULL) 2204 2204 return -EINVAL; 2205 - wm8904->devtype = (enum wm8904_type)match->data; 2205 + wm8904->devtype = (uintptr_t)match->data; 2206 2206 } else { 2207 2207 const struct i2c_device_id *id = 2208 2208 i2c_match_id(wm8904_i2c_id, i2c);