summaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci_xgene.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-10-14 03:45:58 +0200
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-10-18 01:02:14 +0200
commite8fbdf1855f7f31a8f37df60d7be44d8aabe6288 (patch)
treedb529a631ebbcb3a5b55dfd779c3d5251c69966f /drivers/ata/ahci_xgene.c
parentata: ahci_brcm: Fix compilation warning (diff)
downloadlinux-e8fbdf1855f7f31a8f37df60d7be44d8aabe6288.tar.xz
linux-e8fbdf1855f7f31a8f37df60d7be44d8aabe6288.zip
ata: ahci_xgene: Fix compilation warning
When compiling with clang and W=1, the following warning is generated: drivers/ata/ahci_xgene.c:788:14: error: cast to smaller integer type 'enum xgene_ahci_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] version = (enum xgene_ahci_version) of_devid->data; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by using a cast to unsigned long to match the "void *" type size of of_devid->data. Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/ata/ahci_xgene.c')
-rw-r--r--drivers/ata/ahci_xgene.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 7bb5db17f864..1e08704d5117 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -785,7 +785,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
of_devid = of_match_device(xgene_ahci_of_match, dev);
if (of_devid) {
if (of_devid->data)
- version = (enum xgene_ahci_version) of_devid->data;
+ version = (unsigned long) of_devid->data;
}
#ifdef CONFIG_ACPI
else {