ata: libahci: Silence compiler warning on 64-bit
Subsystems (2)
PATCH v2 1/1 ata: libahci: Silence compiler warning on 64-bit
From: Thierry Reding <[email protected]>
Commit 725c7b570fda (ata: libahci_platform: move port_map parameters into the AHCI structure) moves flags into the struct ahci_host_priv's .flags field, which causes compiler warnings on 64-bit builds when that value is cast to a void * pointer. Cast to an unsigned long so that the subsequent cast to a pointer doesn't produce a warning.
---
Changes in v2:
- cast unsigned int to unsigned long to avoid the compiler warning and keep the flags field's type as-is
drivers/ata/libahci_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libahci_platform.c +1 -1
@@ -426,7 +426,7 @@ int ahci_platform_init_host(struct platform_device *pdev, }/* prepare host */ - pi.private_data = (void *)hpriv->flags; + pi.private_data = (void *)(unsigned long )hpriv->flags;ahci_save_initial_config (dev, hpriv);
Signature · 1 line
2.0.3
Tejun Heo
AppliedQuoted 9 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Commit
725c7b570fda(ata:libahci_platform: moveport_mapparameters into the AHCI structure) moves flags into the struct ahci_host_priv's .flags field, which causes compiler warnings on 64-bit builds when that value is cast to a void * pointer. Cast to an unsigned long so that the subsequent cast to a pointer doesn't produce a warning.Signed-off-by Thierry Reding <[email protected]>
Applied to libata/for-3.17.
Thanks!
Signature · 1 line
tejun