]> git.baikalelectronics.ru Git - kernel.git/commit
ata: ahci_imx: Fix compilation warning
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Fri, 14 Oct 2022 01:48:16 +0000 (10:48 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 17 Oct 2022 23:02:14 +0000 (08:02 +0900)
commit8b61a4efb6a46e81114bc74cfa8e5910ecf0177e
tree2cd5ed863535329ca91c3f8cb27edb4344a9592d
parentd137dad8e91f86c917f7cc1c8901221a4086135e
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>
drivers/ata/ahci_imx.c