All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] net: atl1c: Fix a function name in print messages
@ 2021-09-25 12:50 Cai Huoqing
  2021-09-25 12:50 ` [PATCH 2/4] net: broadcom: Fix a function name in comments Cai Huoqing
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Cai Huoqing @ 2021-09-25 12:50 UTC (permalink / raw)
  To: caihuoqing
  Cc: Chris Snook, David S. Miller, Jakub Kicinski, Michael Chan,
	Francois Romieu, Steve Glendinning, netdev, linux-kernel

Use dma_map_single() instead of pci_map_single(),
because the pci function wrappers are not called here.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 20c032ab631b..1c258e4ddc96 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -1847,7 +1847,7 @@ static int atl1c_alloc_rx_buffer(struct atl1c_adapter *adapter, u32 queue,
 			buffer_info->skb = NULL;
 			buffer_info->length = 0;
 			ATL1C_SET_BUFFER_STATE(buffer_info, ATL1C_BUFFER_FREE);
-			netif_warn(adapter, rx_err, adapter->netdev, "RX pci_map_single failed");
+			netif_warn(adapter, rx_err, adapter->netdev, "RX dma_map_single failed");
 			break;
 		}
 		buffer_info->dma = mapping;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] net: broadcom: Fix a function name in comments
  2021-09-25 12:50 [PATCH 1/4] net: atl1c: Fix a function name in print messages Cai Huoqing
@ 2021-09-25 12:50 ` Cai Huoqing
  2021-09-25 12:50 ` [PATCH 3/4] net: sis: " Cai Huoqing
  2021-09-25 12:50 ` [PATCH 4/4] net: smsc: Fix function names in print messages and coments Cai Huoqing
  2 siblings, 0 replies; 6+ messages in thread
From: Cai Huoqing @ 2021-09-25 12:50 UTC (permalink / raw)
  To: caihuoqing
  Cc: Chris Snook, David S. Miller, Jakub Kicinski, Michael Chan,
	Francois Romieu, Steve Glendinning, netdev, linux-kernel

Use dma_alloc_coherent() instead of pci_alloc_consistent(),
because only dma_alloc_coherent() is called here.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/net/ethernet/broadcom/b44.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index fa784953c601..38b465452902 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -1200,7 +1200,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp)
 	bp->rx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size,
 					 &bp->rx_ring_dma, gfp);
 	if (!bp->rx_ring) {
-		/* Allocation may have failed due to pci_alloc_consistent
+		/* Allocation may have failed due to dma_alloc_coherent
 		   insisting on use of GFP_DMA, which is more restrictive
 		   than necessary...  */
 		struct dma_desc *rx_ring;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] net: sis: Fix a function name in comments
  2021-09-25 12:50 [PATCH 1/4] net: atl1c: Fix a function name in print messages Cai Huoqing
  2021-09-25 12:50 ` [PATCH 2/4] net: broadcom: Fix a function name in comments Cai Huoqing
@ 2021-09-25 12:50 ` Cai Huoqing
  2021-09-25 13:07     ` Christophe JAILLET
  2021-09-25 12:50 ` [PATCH 4/4] net: smsc: Fix function names in print messages and coments Cai Huoqing
  2 siblings, 1 reply; 6+ messages in thread
From: Cai Huoqing @ 2021-09-25 12:50 UTC (permalink / raw)
  To: caihuoqing
  Cc: Chris Snook, David S. Miller, Jakub Kicinski, Michael Chan,
	Francois Romieu, Steve Glendinning, netdev, linux-kernel

Use dma_alloc_coherent() instead of pci_alloc_consistent(),
because only dma_alloc_coherent() is called here.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/net/ethernet/sis/sis190.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
index 3d1a18a01ce5..7e107407476a 100644
--- a/drivers/net/ethernet/sis/sis190.c
+++ b/drivers/net/ethernet/sis/sis190.c
@@ -1070,7 +1070,7 @@ static int sis190_open(struct net_device *dev)
 
 	/*
 	 * Rx and Tx descriptors need 256 bytes alignment.
-	 * pci_alloc_consistent() guarantees a stronger alignment.
+	 * dma_alloc_consistent() guarantees a stronger alignment.
 	 */
 	tp->TxDescRing = dma_alloc_coherent(&pdev->dev, TX_RING_BYTES,
 					    &tp->tx_dma, GFP_KERNEL);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] net: smsc: Fix function names in print messages and coments
  2021-09-25 12:50 [PATCH 1/4] net: atl1c: Fix a function name in print messages Cai Huoqing
  2021-09-25 12:50 ` [PATCH 2/4] net: broadcom: Fix a function name in comments Cai Huoqing
  2021-09-25 12:50 ` [PATCH 3/4] net: sis: " Cai Huoqing
@ 2021-09-25 12:50 ` Cai Huoqing
  2 siblings, 0 replies; 6+ messages in thread
From: Cai Huoqing @ 2021-09-25 12:50 UTC (permalink / raw)
  To: caihuoqing
  Cc: Chris Snook, David S. Miller, Jakub Kicinski, Michael Chan,
	Francois Romieu, Steve Glendinning, netdev, linux-kernel

Use dma_xxx_xxx() instead of pci_xxx_xxx(),
because the pci function wrappers are not called here.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/net/ethernet/smsc/smsc9420.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c
index fdbd2a43e267..3d1176588f7d 100644
--- a/drivers/net/ethernet/smsc/smsc9420.c
+++ b/drivers/net/ethernet/smsc/smsc9420.c
@@ -788,7 +788,7 @@ static int smsc9420_alloc_rx_buffer(struct smsc9420_pdata *pd, int index)
 				 PKT_BUF_SZ, DMA_FROM_DEVICE);
 	if (dma_mapping_error(&pd->pdev->dev, mapping)) {
 		dev_kfree_skb_any(skb);
-		netif_warn(pd, rx_err, pd->dev, "pci_map_single failed!\n");
+		netif_warn(pd, rx_err, pd->dev, "dma_map_single failed!\n");
 		return -ENOMEM;
 	}
 
@@ -940,7 +940,7 @@ static netdev_tx_t smsc9420_hard_start_xmit(struct sk_buff *skb,
 				 DMA_TO_DEVICE);
 	if (dma_mapping_error(&pd->pdev->dev, mapping)) {
 		netif_warn(pd, tx_err, pd->dev,
-			   "pci_map_single failed, dropping packet\n");
+			   "dma_map_single failed, dropping packet\n");
 		return NETDEV_TX_BUSY;
 	}
 
@@ -1551,7 +1551,7 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	if (!pd->rx_ring)
 		goto out_free_io_4;
 
-	/* descriptors are aligned due to the nature of pci_alloc_consistent */
+	/* descriptors are aligned due to the nature of dma_alloc_coherent */
 	pd->tx_ring = (pd->rx_ring + RX_RING_SIZE);
 	pd->tx_dma_addr = pd->rx_dma_addr +
 	    sizeof(struct smsc9420_dma_desc) * RX_RING_SIZE;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/4] net: sis: Fix a function name in comments
@ 2021-09-25 13:07     ` Christophe JAILLET
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2021-09-25 13:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev

Le 25/09/2021 à 14:50, Cai Huoqing a écrit :
> Use dma_alloc_coherent() instead of pci_alloc_consistent(),
> because only dma_alloc_coherent() is called here.
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>   drivers/net/ethernet/sis/sis190.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
> index 3d1a18a01ce5..7e107407476a 100644
> --- a/drivers/net/ethernet/sis/sis190.c
> +++ b/drivers/net/ethernet/sis/sis190.c
> @@ -1070,7 +1070,7 @@ static int sis190_open(struct net_device *dev)
>   
>   	/*
>   	 * Rx and Tx descriptors need 256 bytes alignment.
> -	 * pci_alloc_consistent() guarantees a stronger alignment.
> +	 * dma_alloc_consistent() guarantees a stronger alignment.
>   	 */
>   	tp->TxDescRing = dma_alloc_coherent(&pdev->dev, TX_RING_BYTES,
>   					    &tp->tx_dma, GFP_KERNEL);
> 

Hi,
s/consistent/coherent/

CJ


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/4] net: sis: Fix a function name in comments
@ 2021-09-25 13:07     ` Christophe JAILLET
  0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2021-09-25 13:07 UTC (permalink / raw)
  To: Cai Huoqing
  Cc: Chris Snook, David S. Miller, Jakub Kicinski, Michael Chan,
	Francois Romieu, Steve Glendinning, netdev, linux-kernel

Le 25/09/2021 à 14:50, Cai Huoqing a écrit :
> Use dma_alloc_coherent() instead of pci_alloc_consistent(),
> because only dma_alloc_coherent() is called here.
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>   drivers/net/ethernet/sis/sis190.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
> index 3d1a18a01ce5..7e107407476a 100644
> --- a/drivers/net/ethernet/sis/sis190.c
> +++ b/drivers/net/ethernet/sis/sis190.c
> @@ -1070,7 +1070,7 @@ static int sis190_open(struct net_device *dev)
>   
>   	/*
>   	 * Rx and Tx descriptors need 256 bytes alignment.
> -	 * pci_alloc_consistent() guarantees a stronger alignment.
> +	 * dma_alloc_consistent() guarantees a stronger alignment.
>   	 */
>   	tp->TxDescRing = dma_alloc_coherent(&pdev->dev, TX_RING_BYTES,
>   					    &tp->tx_dma, GFP_KERNEL);
> 

Hi,
s/consistent/coherent/

CJ

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-25 13:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-25 12:50 [PATCH 1/4] net: atl1c: Fix a function name in print messages Cai Huoqing
2021-09-25 12:50 ` [PATCH 2/4] net: broadcom: Fix a function name in comments Cai Huoqing
2021-09-25 12:50 ` [PATCH 3/4] net: sis: " Cai Huoqing
2021-09-25 13:07   ` Christophe JAILLET
2021-09-25 13:07     ` Christophe JAILLET
2021-09-25 12:50 ` [PATCH 4/4] net: smsc: Fix function names in print messages and coments Cai Huoqing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.