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.

mtd: rawnand: vf610: Fix Wvoid-pointer-to-enum-cast warning

"nfc->variant" is an enum, thus cast of pointer on 64-bit compile test
with clang W=1 causes:

vf610_nfc.c:843:17: error: cast to smaller integer type 'enum vf610_nfc_variant' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

authored by

Krzysztof Kozlowski and committed by
Miquel Raynal
3b960598 42983837

+1 -1
+1 -1
drivers/mtd/nand/raw/vf610_nfc.c
··· 840 840 return PTR_ERR(nfc->clk); 841 841 } 842 842 843 - nfc->variant = (enum vf610_nfc_variant)device_get_match_data(&pdev->dev); 843 + nfc->variant = (unsigned long)device_get_match_data(&pdev->dev); 844 844 if (!nfc->variant) 845 845 return -ENODEV; 846 846