* [PATCH 0/2] net: ag71xx: 2 small patches for 'ag71xx_rings_init()'
@ 2019-07-31 8:06 ` Christophe JAILLET
0 siblings, 0 replies; 14+ messages in thread
From: Christophe JAILLET @ 2019-07-31 8:06 UTC (permalink / raw)
To: jcliburn, davem, chris.snook
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
Christophe JAILLET (2):
net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC in
'ag71xx_rings_init()'
drivers/net/ethernet/atheros/ag71xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 0/2] net: ag71xx: 2 small patches for 'ag71xx_rings_init()'
@ 2019-07-31 8:06 ` Christophe JAILLET
0 siblings, 0 replies; 14+ messages in thread
From: Christophe JAILLET @ 2019-07-31 8:06 UTC (permalink / raw)
To: jcliburn, davem, chris.snook
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
Christophe JAILLET (2):
net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC in
'ag71xx_rings_init()'
drivers/net/ethernet/atheros/ag71xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/2] net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
2019-07-31 8:06 ` Christophe JAILLET
@ 2019-07-31 8:06 ` Christophe JAILLET
-1 siblings, 0 replies; 14+ messages in thread
From: Christophe JAILLET @ 2019-07-31 8:06 UTC (permalink / raw)
To: jcliburn, davem, chris.snook
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
A few lines above, we have:
tx_size = BIT(tx->order);
So use 'tx_size' directly to be consistent with the way 'rx->descs_cpu' and
'rx->descs_dma' are computed below.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/atheros/ag71xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index 77542bd1e5bd..40a8717f51b1 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -1148,7 +1148,7 @@ static int ag71xx_rings_init(struct ag71xx *ag)
return -ENOMEM;
}
- rx->buf = &tx->buf[BIT(tx->order)];
+ rx->buf = &tx->buf[tx_size];
rx->descs_cpu = ((void *)tx->descs_cpu) + tx_size * AG71XX_DESC_SIZE;
rx->descs_dma = tx->descs_dma + tx_size * AG71XX_DESC_SIZE;
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 1/2] net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
@ 2019-07-31 8:06 ` Christophe JAILLET
0 siblings, 0 replies; 14+ messages in thread
From: Christophe JAILLET @ 2019-07-31 8:06 UTC (permalink / raw)
To: jcliburn, davem, chris.snook
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
A few lines above, we have:
tx_size = BIT(tx->order);
So use 'tx_size' directly to be consistent with the way 'rx->descs_cpu' and
'rx->descs_dma' are computed below.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/atheros/ag71xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index 77542bd1e5bd..40a8717f51b1 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -1148,7 +1148,7 @@ static int ag71xx_rings_init(struct ag71xx *ag)
return -ENOMEM;
}
- rx->buf = &tx->buf[BIT(tx->order)];
+ rx->buf = &tx->buf[tx_size];
rx->descs_cpu = ((void *)tx->descs_cpu) + tx_size * AG71XX_DESC_SIZE;
rx->descs_dma = tx->descs_dma + tx_size * AG71XX_DESC_SIZE;
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
2019-07-31 8:06 ` Christophe JAILLET
@ 2019-07-31 15:38 ` David Miller
-1 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2019-07-31 15:38 UTC (permalink / raw)
To: christophe.jaillet
Cc: jcliburn, chris.snook, netdev, linux-kernel, kernel-janitors
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Wed, 31 Jul 2019 10:06:38 +0200
> A few lines above, we have:
> tx_size = BIT(tx->order);
>
> So use 'tx_size' directly to be consistent with the way 'rx->descs_cpu' and
> 'rx->descs_dma' are computed below.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to net-next.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
@ 2019-07-31 15:38 ` David Miller
0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2019-07-31 15:38 UTC (permalink / raw)
To: christophe.jaillet
Cc: jcliburn, chris.snook, netdev, linux-kernel, kernel-janitors
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Wed, 31 Jul 2019 10:06:38 +0200
> A few lines above, we have:
> tx_size = BIT(tx->order);
>
> So use 'tx_size' directly to be consistent with the way 'rx->descs_cpu' and
> 'rx->descs_dma' are computed below.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to net-next.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
2019-07-31 8:06 ` Christophe JAILLET
@ 2019-08-08 5:29 ` Jesse Brandeburg
-1 siblings, 0 replies; 14+ messages in thread
From: Jesse Brandeburg @ 2019-08-08 5:29 UTC (permalink / raw)
To: Christophe JAILLET
Cc: jcliburn, davem, chris.snook, netdev, linux-kernel,
kernel-janitors, jesse.brandeburg
On Wed, 31 Jul 2019 10:06:38 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> A few lines above, we have:
> tx_size = BIT(tx->order);
>
> So use 'tx_size' directly to be consistent with the way 'rx->descs_cpu' and
> 'rx->descs_dma' are computed below.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()'
@ 2019-08-08 5:29 ` Jesse Brandeburg
0 siblings, 0 replies; 14+ messages in thread
From: Jesse Brandeburg @ 2019-08-08 5:29 UTC (permalink / raw)
To: Christophe JAILLET
Cc: jcliburn, davem, chris.snook, netdev, linux-kernel,
kernel-janitors, jesse.brandeburg
On Wed, 31 Jul 2019 10:06:38 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> A few lines above, we have:
> tx_size = BIT(tx->order);
>
> So use 'tx_size' directly to be consistent with the way 'rx->descs_cpu' and
> 'rx->descs_dma' are computed below.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/2] net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC in 'ag71xx_rings_init()'
2019-07-31 8:06 ` Christophe JAILLET
@ 2019-07-31 8:06 ` Christophe JAILLET
-1 siblings, 0 replies; 14+ messages in thread
From: Christophe JAILLET @ 2019-07-31 8:06 UTC (permalink / raw)
To: jcliburn, davem, chris.snook
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
There is no need to use GFP_ATOMIC here, GFP_KERNEL should be enough.
The 'kcalloc()' just a few lines above, already uses GFP_KERNEL.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
I've done my best to check if a spinlock can be hold when reaching this
code. Apparently it is never the case.
But double check to be sure that it is not the kcalloc that should use
GFP_ATOMIC.
---
drivers/net/ethernet/atheros/ag71xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index 40a8717f51b1..7548247455d7 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -1141,7 +1141,7 @@ static int ag71xx_rings_init(struct ag71xx *ag)
tx->descs_cpu = dma_alloc_coherent(&ag->pdev->dev,
ring_size * AG71XX_DESC_SIZE,
- &tx->descs_dma, GFP_ATOMIC);
+ &tx->descs_dma, GFP_KERNEL);
if (!tx->descs_cpu) {
kfree(tx->buf);
tx->buf = NULL;
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/2] net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC in 'ag71xx_rings_init()'
@ 2019-07-31 8:06 ` Christophe JAILLET
0 siblings, 0 replies; 14+ messages in thread
From: Christophe JAILLET @ 2019-07-31 8:06 UTC (permalink / raw)
To: jcliburn, davem, chris.snook
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
There is no need to use GFP_ATOMIC here, GFP_KERNEL should be enough.
The 'kcalloc()' just a few lines above, already uses GFP_KERNEL.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
I've done my best to check if a spinlock can be hold when reaching this
code. Apparently it is never the case.
But double check to be sure that it is not the kcalloc that should use
GFP_ATOMIC.
---
drivers/net/ethernet/atheros/ag71xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index 40a8717f51b1..7548247455d7 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -1141,7 +1141,7 @@ static int ag71xx_rings_init(struct ag71xx *ag)
tx->descs_cpu = dma_alloc_coherent(&ag->pdev->dev,
ring_size * AG71XX_DESC_SIZE,
- &tx->descs_dma, GFP_ATOMIC);
+ &tx->descs_dma, GFP_KERNEL);
if (!tx->descs_cpu) {
kfree(tx->buf);
tx->buf = NULL;
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC in 'ag71xx_rings_init()'
2019-07-31 8:06 ` Christophe JAILLET
@ 2019-07-31 15:39 ` David Miller
-1 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2019-07-31 15:39 UTC (permalink / raw)
To: christophe.jaillet
Cc: jcliburn, chris.snook, netdev, linux-kernel, kernel-janitors
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Wed, 31 Jul 2019 10:06:48 +0200
> There is no need to use GFP_ATOMIC here, GFP_KERNEL should be enough.
> The 'kcalloc()' just a few lines above, already uses GFP_KERNEL.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to 'net'
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC in 'ag71xx_rings_init()'
@ 2019-07-31 15:39 ` David Miller
0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2019-07-31 15:39 UTC (permalink / raw)
To: christophe.jaillet
Cc: jcliburn, chris.snook, netdev, linux-kernel, kernel-janitors
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Wed, 31 Jul 2019 10:06:48 +0200
> There is no need to use GFP_ATOMIC here, GFP_KERNEL should be enough.
> The 'kcalloc()' just a few lines above, already uses GFP_KERNEL.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to 'net'
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC in 'ag71xx_rings_init()'
2019-07-31 8:06 ` Christophe JAILLET
@ 2019-08-08 5:30 ` Jesse Brandeburg
-1 siblings, 0 replies; 14+ messages in thread
From: Jesse Brandeburg @ 2019-08-08 5:30 UTC (permalink / raw)
To: Christophe JAILLET
Cc: jcliburn, davem, chris.snook, netdev, linux-kernel,
kernel-janitors, jesse.brandeburg
On Wed, 31 Jul 2019 10:06:48 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> There is no need to use GFP_ATOMIC here, GFP_KERNEL should be enough.
> The 'kcalloc()' just a few lines above, already uses GFP_KERNEL.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC in 'ag71xx_rings_init()'
@ 2019-08-08 5:30 ` Jesse Brandeburg
0 siblings, 0 replies; 14+ messages in thread
From: Jesse Brandeburg @ 2019-08-08 5:30 UTC (permalink / raw)
To: Christophe JAILLET
Cc: jcliburn, davem, chris.snook, netdev, linux-kernel,
kernel-janitors, jesse.brandeburg
On Wed, 31 Jul 2019 10:06:48 +0200
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> There is no need to use GFP_ATOMIC here, GFP_KERNEL should be enough.
> The 'kcalloc()' just a few lines above, already uses GFP_KERNEL.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2019-08-08 5:30 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 8:06 [PATCH 0/2] net: ag71xx: 2 small patches for 'ag71xx_rings_init()' Christophe JAILLET
2019-07-31 8:06 ` Christophe JAILLET
2019-07-31 8:06 ` [PATCH 1/2] net: ag71xx: Slighly simplify code in 'ag71xx_rings_init()' Christophe JAILLET
2019-07-31 8:06 ` Christophe JAILLET
2019-07-31 15:38 ` David Miller
2019-07-31 15:38 ` David Miller
2019-08-08 5:29 ` Jesse Brandeburg
2019-08-08 5:29 ` Jesse Brandeburg
2019-07-31 8:06 ` [PATCH 2/2] net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC " Christophe JAILLET
2019-07-31 8:06 ` Christophe JAILLET
2019-07-31 15:39 ` David Miller
2019-07-31 15:39 ` David Miller
2019-08-08 5:30 ` Jesse Brandeburg
2019-08-08 5:30 ` Jesse Brandeburg
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.