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