* [PATCH v2] ata: libahci: Silence compiler warning on 64-bit
@ 2014-08-01 14:30 Thierry Reding
2014-08-01 15:19 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2014-08-01 14:30 UTC (permalink / raw)
To: Tejun Heo; +Cc: Antoine Ténart, linux-ide, linux-kernel
From: Thierry Reding <treding@nvidia.com>
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.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
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(-)
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index a60b8cd40198..5b92c290e6c6 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -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);
--
2.0.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ata: libahci: Silence compiler warning on 64-bit
2014-08-01 14:30 [PATCH v2] ata: libahci: Silence compiler warning on 64-bit Thierry Reding
@ 2014-08-01 15:19 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2014-08-01 15:19 UTC (permalink / raw)
To: Thierry Reding; +Cc: Antoine Ténart, linux-ide, linux-kernel
On Fri, Aug 01, 2014 at 04:30:37PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> 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.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
Applied to libata/for-3.17.
Thanks!
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-01 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 14:30 [PATCH v2] ata: libahci: Silence compiler warning on 64-bit Thierry Reding
2014-08-01 15:19 ` Tejun Heo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.