Skip to content

Commit c23c7c6

Browse files
krzkbroonie
authored andcommitted
ASoC: codecs: tas2764: Fix Wvoid-pointer-to-enum-cast warning
'devid' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: tas2764.c:879:19: error: cast to smaller integer type 'enum tas2764_devid' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] One of the discussions in 2023 on LKML suggested warning is not suitable for kernel. Nothing changed in this regard for more than a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 9cd54a6 commit c23c7c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/codecs/tas2764.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ static int tas2764_i2c_probe(struct i2c_client *client)
876876
if (!tas2764)
877877
return -ENOMEM;
878878

879-
tas2764->devid = (enum tas2764_devid)of_device_get_match_data(&client->dev);
879+
tas2764->devid = (kernel_ulong_t)of_device_get_match_data(&client->dev);
880880

881881
tas2764->dev = &client->dev;
882882
tas2764->irq = client->irq;

0 commit comments

Comments
 (0)