[PATCH 12/16] ata: ahci: make rx_fis field in ahci_port of type void*

Denis Orlov denorl2009 at gmail.com
Wed May 4 02:25:49 PDT 2022


It is supposed to represent a pointer so make it actually be one.

Signed-off-by: Denis Orlov <denorl2009 at gmail.com>
---
 drivers/ata/ahci.c | 5 ++---
 drivers/ata/ahci.h | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index d423da3a48..23085ebe09 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -307,8 +307,7 @@ static int ahci_init_port(struct ahci_port *ahci_port)
 	/*
 	 * Second item: Received-FIS area
 	 */
-	ahci_port->rx_fis = (unsigned long)dma_alloc_coherent(AHCI_RX_FIS_SZ,
-						&ahci_port->rx_fis_dma);
+	ahci_port->rx_fis = dma_alloc_coherent(AHCI_RX_FIS_SZ, &ahci_port->rx_fis_dma);
 	if (!ahci_port->rx_fis) {
 		ret = -ENOMEM;
 		goto err_alloc1;
@@ -422,7 +421,7 @@ err_init:
 	dma_free_coherent(ahci_port->cmd_tbl, ahci_port->cmd_tbl_dma,
 			  AHCI_CMD_TBL_SZ);
 err_alloc2:
-	dma_free_coherent((void *)ahci_port->rx_fis, ahci_port->rx_fis_dma,
+	dma_free_coherent(ahci_port->rx_fis, ahci_port->rx_fis_dma,
 			  AHCI_RX_FIS_SZ);
 err_alloc1:
 	dma_free_coherent(ahci_port->cmd_slot, ahci_port->cmd_slot_dma,
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index de404e2e16..77196592ed 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -179,7 +179,7 @@ struct ahci_port {
 	struct ahci_sg		*cmd_tbl_sg;
 	void			*cmd_tbl;
 	dma_addr_t		cmd_tbl_dma;
-	u32			rx_fis;
+	void			*rx_fis;
 	dma_addr_t		rx_fis_dma;
 };
 
-- 
2.20.1




More information about the barebox mailing list