Skip to content

Commit 2ce3a0b

Browse files
author
Damien Le Moal
committed
ata: ahci_qoriq: Fix compilation warning
When compiling with clang and W=1, the following warning is generated: drivers/ata/ahci_qoriq.c:283:22: error: cast to smaller integer type 'enum ahci_qoriq_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] qoriq_priv->type = (enum ahci_qoriq_type)of_id->data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by using a cast to unsigned long to match the "void *" type size of of_id->data. Signed-off-by: Damien Le Moal <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
1 parent 26d9f48 commit 2ce3a0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/ahci_qoriq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static int ahci_qoriq_probe(struct platform_device *pdev)
280280
return -ENOMEM;
281281

282282
if (of_id)
283-
qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
283+
qoriq_priv->type = (unsigned long)of_id->data;
284284
else
285285
qoriq_priv->type = (enum ahci_qoriq_type)acpi_id->driver_data;
286286

0 commit comments

Comments
 (0)