Skip to content

Commit b2ee6a3

Browse files
krzklag-linaro
authored andcommitted
mfd: hi6421-pmic: Fix Wvoid-pointer-to-enum-cast warning
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: hi6421-pmic-core.c:62:9: error: cast to smaller integer type 'enum hi6421_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent b1da996 commit b2ee6a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/hi6421-pmic-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int hi6421_pmic_probe(struct platform_device *pdev)
5959
id = of_match_device(of_hi6421_pmic_match, &pdev->dev);
6060
if (!id)
6161
return -EINVAL;
62-
type = (enum hi6421_type)id->data;
62+
type = (uintptr_t)id->data;
6363

6464
pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
6565
if (!pmic)

0 commit comments

Comments
 (0)