]> git.baikalelectronics.ru Git - kernel.git/commit
ata: ahci_qoriq: Fix compilation warning
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Fri, 14 Oct 2022 02:03:49 +0000 (11:03 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 17 Oct 2022 23:02:14 +0000 (08:02 +0900)
commite42f48082031431882f78795a97528af9df1d87e
tree5abe24bb23d4fadcade1333d58bfa2bd3eb2fce5
parent47049574e80f5dfc93bb7cc35316887fc60390e1
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>
drivers/ata/ahci_qoriq.c