linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gve: Fix the size used in a 'dma_free_coherent()' call
@ 2020-08-02 14:15 Christophe JAILLET
  2020-08-03 15:41 ` Jakub Kicinski
  0 siblings, 1 reply; 7+ messages in thread
From: Christophe JAILLET @ 2020-08-02 14:15 UTC (permalink / raw)
  To: csully, sagis, jonolson, davem, kuba, lrizzo
  Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET

Update the size used in 'dma_free_coherent()' in order to match the one
used in the corresponding 'dma_alloc_coherent()'.

Fixes: 893ce44df5 ("gve: Add basic driver framework for Compute Engine Virtual NIC")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/google/gve/gve_adminq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c
index c3ba7baf0107..883e173f5ca0 100644
--- a/drivers/net/ethernet/google/gve/gve_adminq.c
+++ b/drivers/net/ethernet/google/gve/gve_adminq.c
@@ -322,7 +322,7 @@ int gve_adminq_describe_device(struct gve_priv *priv)
 	priv->default_num_queues = be16_to_cpu(descriptor->default_num_queues);
 
 free_device_descriptor:
-	dma_free_coherent(&priv->pdev->dev, sizeof(*descriptor), descriptor,
+	dma_free_coherent(&priv->pdev->dev, PAGE_SIZE, descriptor,
 			  descriptor_bus);
 	return err;
 }
-- 
2.25.1


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

end of thread, other threads:[~2020-08-04  7:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-02 14:15 [PATCH] gve: Fix the size used in a 'dma_free_coherent()' call Christophe JAILLET
2020-08-03 15:41 ` Jakub Kicinski
2020-08-03 19:19   ` Christophe JAILLET
2020-08-03 19:35     ` Joe Perches
2020-08-03 19:50       ` Christophe JAILLET
2020-08-03 19:50         ` Christophe JAILLET
2020-08-04  7:16         ` Willem de Bruijn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).