mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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>
This commit is contained in:
parent
7d7b0c8512
commit
e8fbdf1855
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue