mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
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>
This commit is contained in:
parent
e8fbdf1855
commit
26d9f48d99
@ -1067,7 +1067,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
|
||||
imxpriv->ahci_pdev = pdev;
|
||||
imxpriv->no_device = false;
|
||||
imxpriv->first_time = true;
|
||||
imxpriv->type = (enum ahci_imx_type)of_id->data;
|
||||
imxpriv->type = (unsigned long)of_id->data;
|
||||
|
||||
imxpriv->sata_clk = devm_clk_get(dev, "sata");
|
||||
if (IS_ERR(imxpriv->sata_clk)) {
|
||||
|
Loading…
Reference in New Issue
Block a user