Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: libahci: Silence compiler warning on 64-bit

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>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Thierry Reding and committed by
Tejun Heo
c4121c65 724f24ee

+1 -1
+1 -1
drivers/ata/libahci_platform.c
··· 426 426 } 427 427 428 428 /* prepare host */ 429 - pi.private_data = (void *)hpriv->flags; 429 + pi.private_data = (void *)(unsigned long)hpriv->flags; 430 430 431 431 ahci_save_initial_config(dev, hpriv); 432 432