[PATCH 2/8] ata: ahci: Fix format string

Alexander Shiyan eagle.alexander923 at gmail.com
Thu Jun 9 22:40:44 PDT 2022


drivers/ata/ahci.c: In function 'ahci_print_info':
drivers/ata/ahci.c:517:9: warning: too many arguments for format [-Wformat-extra-args]

Fixes: b5da6970bf23 ("ata: ahci: add missing capability in ahci_print_info()")
Signed-off-by: Alexander Shiyan <eagle.alexander923 at gmail.com>
---
 drivers/ata/ahci.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index eb9e1bd133..f4b93183ce 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -304,8 +304,8 @@ static int ahci_init_port(struct ahci_port *ahci_port)
 	ahci_port->cmd_slot = mem;
 	ahci_port->cmd_slot_dma = mem_dma;
 
-	ahci_port_debug(ahci_port, "cmd_slot = 0x%p (0x%pa)\n",
-			ahci_port->cmd_slot, ahci_port->cmd_slot_dma);
+	ahci_port_debug(ahci_port, "cmd_slot = 0x%p (0x%pad)\n",
+			ahci_port->cmd_slot, &ahci_port->cmd_slot_dma);
 
 	/*
 	 * Second item: Received-FIS area
@@ -320,8 +320,8 @@ static int ahci_init_port(struct ahci_port *ahci_port)
 	ahci_port->cmd_tbl = mem + AHCI_CMD_LIST_SZ + AHCI_RX_FIS_SZ;
 	ahci_port->cmd_tbl_dma = mem_dma + AHCI_CMD_LIST_SZ + AHCI_RX_FIS_SZ;
 
-	ahci_port_debug(ahci_port, "cmd_tbl = 0x%p (0x%pa)\n",
-			ahci_port->cmd_tbl, ahci_port->cmd_tbl_dma);
+	ahci_port_debug(ahci_port, "cmd_tbl = 0x%p (0x%pad)\n",
+			ahci_port->cmd_tbl, &ahci_port->cmd_tbl_dma);
 
 	ahci_port->cmd_tbl_sg = ahci_port->cmd_tbl + AHCI_CMD_TBL_HDR_SZ;
 
@@ -517,7 +517,7 @@ void ahci_print_info(struct ahci_device *ahci)
 	printf("flags: "
 	       "%s%s%s%s%s%s%s"
 	       "%s%s%s%s%s%s%s"
-	       "%s%s%s%s%s%s\n",
+	       "%s%s%s%s%s%s%s\n",
 	       cap & HOST_CAP_64 ? "64bit " : "",
 	       cap & HOST_CAP_NCQ ? "ncq " : "",
 	       cap & HOST_CAP_SNTF ? "sntf " : "",
-- 
2.32.0




More information about the barebox mailing list