From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Fri, 12 Mar 2021 11:34:25 +0100 Subject: [PATCH u-boot v2 34/38] ata: ahci: fix ahci_link_up() type mismatch for LTO In-Reply-To: <20210312103429.25895-1-marek.behun@nic.cz> References: <20210312103429.25895-1-marek.behun@nic.cz> Message-ID: <20210312103429.25895-35-marek.behun@nic.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Reviewed-by: Bin Meng --- drivers/ata/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 2ef21ec508..3d16bc21a8 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -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; -- 2.26.2