summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-10-14 03:48:16 +0200
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-10-18 01:02:14 +0200
commit26d9f48d9981205a7e229e21e183dbf1f13de83e (patch)
tree2cd5ed863535329ca91c3f8cb27edb4344a9592d /drivers
parentata: ahci_xgene: Fix compilation warning (diff)
downloadlinux-26d9f48d9981205a7e229e21e183dbf1f13de83e.tar.xz
linux-26d9f48d9981205a7e229e21e183dbf1f13de83e.zip
ata: ahci_imx: Fix compilation warning
When compiling with clang and W=1, the following warning is generated: drivers/ata/ahci_imx.c:1070:18: error: cast to smaller integer type 'enum ahci_imx_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] imxpriv->type = (enum ahci_imx_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 <damien.lemoal@opensource.wdc.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/ahci_imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 632caa301458..a950767f7948 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -1067,7 +1067,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
imxpriv->ahci_pdev = pdev;
imxpriv->no_device = false;
imxpriv->first_time = true;
- imxpriv->type = (enum ahci_imx_type)of_id->data;
+ imxpriv->type = (unsigned long)of_id->data;
imxpriv->sata_clk = devm_clk_get(dev, "sata");
if (IS_ERR(imxpriv->sata_clk)) {