diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-10-14 11:03:49 +0900 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-10-18 08:02:14 +0900 |
commit | 2ce3a0bf2010b16c78b78cc35a97fa913f1be0ca (patch) | |
tree | 5abe24bb23d4fadcade1333d58bfa2bd3eb2fce5 /drivers/ata | |
parent | 26d9f48d9981205a7e229e21e183dbf1f13de83e (diff) | |
download | linux-2ce3a0bf2010b16c78b78cc35a97fa913f1be0ca.tar.gz |
ata: ahci_qoriq: Fix compilation warning
When compiling with clang and W=1, the following warning is generated:
drivers/ata/ahci_qoriq.c:283:22: error: cast to smaller integer type
'enum ahci_qoriq_type' from 'const void *'
[-Werror,-Wvoid-pointer-to-enum-cast]
qoriq_priv->type = (enum ahci_qoriq_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/ata')
-rw-r--r-- | drivers/ata/ahci_qoriq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index 6cd61842ad48..9cf9bf36a874 100644 --- a/drivers/ata/ahci_qoriq.c +++ b/drivers/ata/ahci_qoriq.c @@ -280,7 +280,7 @@ static int ahci_qoriq_probe(struct platform_device *pdev) return -ENOMEM; if (of_id) - qoriq_priv->type = (enum ahci_qoriq_type)of_id->data; + qoriq_priv->type = (unsigned long)of_id->data; else qoriq_priv->type = (enum ahci_qoriq_type)acpi_id->driver_data; |