ata: ahci: fix ahci_link_up() type mismatch for LTO

When building highbank_defconfig with LTO, the compiler complains about
type mismatch of function ahci_link_up().

The third parameter of this function is of type u8 in
drivers/ata/ahci.c, but of type int in board/highbank/ahci.c.

There is no reason in using u8, and the code using this function
actually passes an int variable into the function (so it is implicitly
converted to u8).

Change the type of this parameter to int in drivers/ata/ahci.c.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Marek Behún 2021-05-20 13:24:21 +02:00 committed by Tom Rini
parent 37de198fa2
commit 2361b5eb5c

View File

@ -110,7 +110,7 @@ static int waiting_for_cmd_completed(void __iomem *offset,
return (i < timeout_msec) ? 0 : -1;
}
int __weak ahci_link_up(struct ahci_uc_priv *uc_priv, u8 port)
int __weak ahci_link_up(struct ahci_uc_priv *uc_priv, int port)
{
u32 tmp;
int j = 0;