Re: [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-29 Thread Joe Perches
On Thu, 2013-08-29 at 22:09 -0400, David Miller wrote:
> Applied, thanks a lot Joe.

Too bad I didn't know there was a dma_zalloc_coherent
the first time...

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-29 Thread David Miller
From: Joe Perches 
Date: Mon, 26 Aug 2013 22:45:23 -0700

> __GFP_ZERO is an uncommon flag and perhaps is better
> not used.  static inline dma_zalloc_coherent exists
> so convert the uses of dma_alloc_coherent with __GFP_ZERO
> to the more common kernel style with zalloc.
> 
> Remove memset from the static inline dma_zalloc_coherent
> and add just one use of __GFP_ZERO instead.
> 
> Trivially reduces the size of the existing uses of
> dma_zalloc_coherent.
> 
> Realign arguments as appropriate.
> 
> Signed-off-by: Joe Perches 

Applied, thanks a lot Joe.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-29 Thread David Miller
From: Joe Perches j...@perches.com
Date: Mon, 26 Aug 2013 22:45:23 -0700

 __GFP_ZERO is an uncommon flag and perhaps is better
 not used.  static inline dma_zalloc_coherent exists
 so convert the uses of dma_alloc_coherent with __GFP_ZERO
 to the more common kernel style with zalloc.
 
 Remove memset from the static inline dma_zalloc_coherent
 and add just one use of __GFP_ZERO instead.
 
 Trivially reduces the size of the existing uses of
 dma_zalloc_coherent.
 
 Realign arguments as appropriate.
 
 Signed-off-by: Joe Perches j...@perches.com

Applied, thanks a lot Joe.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-29 Thread Joe Perches
On Thu, 2013-08-29 at 22:09 -0400, David Miller wrote:
 Applied, thanks a lot Joe.

Too bad I didn't know there was a dma_zalloc_coherent
the first time...

cheers, Joe

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [E1000-devel] [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-27 Thread Jeff Kirsher
On Mon, 2013-08-26 at 22:45 -0700, Joe Perches wrote:
> __GFP_ZERO is an uncommon flag and perhaps is better
> not used.  static inline dma_zalloc_coherent exists
> so convert the uses of dma_alloc_coherent with __GFP_ZERO
> to the more common kernel style with zalloc.
> 
> Remove memset from the static inline dma_zalloc_coherent
> and add just one use of __GFP_ZERO instead.
> 
> Trivially reduces the size of the existing uses of
> dma_zalloc_coherent.
> 
> Realign arguments as appropriate.
> 
> Signed-off-by: Joe Perches 

Acked-by: Jeff Kirsher 


signature.asc
Description: This is a digitally signed message part


Re: [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-27 Thread Jesse Brandeburg
On Mon, 26 Aug 2013 22:45:23 -0700
Joe Perches  wrote:

> __GFP_ZERO is an uncommon flag and perhaps is better
> not used.  static inline dma_zalloc_coherent exists
> so convert the uses of dma_alloc_coherent with __GFP_ZERO
> to the more common kernel style with zalloc.
> 
> Remove memset from the static inline dma_zalloc_coherent
> and add just one use of __GFP_ZERO instead.
> 
> Trivially reduces the size of the existing uses of
> dma_zalloc_coherent.
> 
> Realign arguments as appropriate.
> 
> Signed-off-by: Joe Perches 

e1000 and ixgb bits:

Acked-by: Jesse Brandeburg 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-27 Thread Neil Horman
On Mon, Aug 26, 2013 at 10:45:23PM -0700, Joe Perches wrote:
> __GFP_ZERO is an uncommon flag and perhaps is better
> not used.  static inline dma_zalloc_coherent exists
> so convert the uses of dma_alloc_coherent with __GFP_ZERO
> to the more common kernel style with zalloc.
> 
> Remove memset from the static inline dma_zalloc_coherent
> and add just one use of __GFP_ZERO instead.
> 
> Trivially reduces the size of the existing uses of
> dma_zalloc_coherent.
> 
> Realign arguments as appropriate.
> 
> Signed-off-by: Joe Perches 
Acked-by: Neil Horman 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-27 Thread Neil Horman
On Mon, Aug 26, 2013 at 10:45:23PM -0700, Joe Perches wrote:
 __GFP_ZERO is an uncommon flag and perhaps is better
 not used.  static inline dma_zalloc_coherent exists
 so convert the uses of dma_alloc_coherent with __GFP_ZERO
 to the more common kernel style with zalloc.
 
 Remove memset from the static inline dma_zalloc_coherent
 and add just one use of __GFP_ZERO instead.
 
 Trivially reduces the size of the existing uses of
 dma_zalloc_coherent.
 
 Realign arguments as appropriate.
 
 Signed-off-by: Joe Perches j...@perches.com
Acked-by: Neil Horman nhor...@tuxdriver.com

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-27 Thread Jesse Brandeburg
On Mon, 26 Aug 2013 22:45:23 -0700
Joe Perches j...@perches.com wrote:

 __GFP_ZERO is an uncommon flag and perhaps is better
 not used.  static inline dma_zalloc_coherent exists
 so convert the uses of dma_alloc_coherent with __GFP_ZERO
 to the more common kernel style with zalloc.
 
 Remove memset from the static inline dma_zalloc_coherent
 and add just one use of __GFP_ZERO instead.
 
 Trivially reduces the size of the existing uses of
 dma_zalloc_coherent.
 
 Realign arguments as appropriate.
 
 Signed-off-by: Joe Perches j...@perches.com

e1000 and ixgb bits:

Acked-by: Jesse Brandeburg jesse.brandeb...@intel.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [E1000-devel] [PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-27 Thread Jeff Kirsher
On Mon, 2013-08-26 at 22:45 -0700, Joe Perches wrote:
 __GFP_ZERO is an uncommon flag and perhaps is better
 not used.  static inline dma_zalloc_coherent exists
 so convert the uses of dma_alloc_coherent with __GFP_ZERO
 to the more common kernel style with zalloc.
 
 Remove memset from the static inline dma_zalloc_coherent
 and add just one use of __GFP_ZERO instead.
 
 Trivially reduces the size of the existing uses of
 dma_zalloc_coherent.
 
 Realign arguments as appropriate.
 
 Signed-off-by: Joe Perches j...@perches.com

Acked-by: Jeff Kirsher jeffrey.t.kirs...@intel.com


signature.asc
Description: This is a digitally signed message part


[PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-26 Thread Joe Perches
__GFP_ZERO is an uncommon flag and perhaps is better
not used.  static inline dma_zalloc_coherent exists
so convert the uses of dma_alloc_coherent with __GFP_ZERO
to the more common kernel style with zalloc.

Remove memset from the static inline dma_zalloc_coherent
and add just one use of __GFP_ZERO instead.

Trivially reduces the size of the existing uses of
dma_zalloc_coherent.

Realign arguments as appropriate.

Signed-off-by: Joe Perches 
---
 drivers/net/ethernet/aeroflex/greth.c  | 12 -
 drivers/net/ethernet/broadcom/bcm63xx_enet.c   |  6 ++---
 drivers/net/ethernet/broadcom/bnx2.c   |  5 ++--
 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h|  5 ++--
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h|  3 +--
 drivers/net/ethernet/broadcom/tg3.c| 23 -
 drivers/net/ethernet/emulex/benet/be_main.c| 18 +++---
 drivers/net/ethernet/faraday/ftgmac100.c   |  7 +++---
 drivers/net/ethernet/faraday/ftmac100.c|  8 +++---
 drivers/net/ethernet/ibm/emac/mal.c|  4 +--
 drivers/net/ethernet/intel/e1000/e1000_ethtool.c   |  8 +++---
 drivers/net/ethernet/intel/ixgb/ixgb_main.c|  4 +--
 drivers/net/ethernet/marvell/pxa168_eth.c  | 19 +++---
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c   |  6 ++---
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c   | 16 ++--
 drivers/net/ethernet/pasemi/pasemi_mac.c   |  7 +++---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c| 29 +++---
 drivers/net/ethernet/sfc/nic.c |  5 ++--
 drivers/net/ethernet/sgi/meth.c|  5 ++--
 drivers/net/ethernet/tundra/tsi108_eth.c   |  8 +++---
 drivers/net/ethernet/xilinx/ll_temac_main.c| 12 -
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c  | 14 +--
 drivers/net/fddi/defxx.c   |  6 ++---
 drivers/net/irda/ali-ircc.c|  8 +++---
 drivers/net/irda/nsc-ircc.c|  8 +++---
 drivers/net/irda/smsc-ircc2.c  |  8 +++---
 drivers/net/irda/via-ircc.c|  8 +++---
 drivers/net/irda/w83977af_ir.c |  8 +++---
 drivers/net/wireless/b43/dma.c |  6 ++---
 drivers/net/wireless/b43legacy/dma.c   |  7 +++---
 include/linux/dma-mapping.h|  5 ++--
 31 files changed, 135 insertions(+), 153 deletions(-)

diff --git a/drivers/net/ethernet/aeroflex/greth.c 
b/drivers/net/ethernet/aeroflex/greth.c
index 7ff4b30..e066945 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -1464,18 +1464,18 @@ static int greth_of_probe(struct platform_device *ofdev)
}
 
/* Allocate TX descriptor ring in coherent memory */
-   greth->tx_bd_base = dma_alloc_coherent(greth->dev, 1024,
-  >tx_bd_base_phys,
-  GFP_KERNEL | __GFP_ZERO);
+   greth->tx_bd_base = dma_zalloc_coherent(greth->dev, 1024,
+   >tx_bd_base_phys,
+   GFP_KERNEL);
if (!greth->tx_bd_base) {
err = -ENOMEM;
goto error3;
}
 
/* Allocate RX descriptor ring in coherent memory */
-   greth->rx_bd_base = dma_alloc_coherent(greth->dev, 1024,
-  >rx_bd_base_phys,
-  GFP_KERNEL | __GFP_ZERO);
+   greth->rx_bd_base = dma_zalloc_coherent(greth->dev, 1024,
+   >rx_bd_base_phys,
+   GFP_KERNEL);
if (!greth->rx_bd_base) {
err = -ENOMEM;
goto error4;
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c 
b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index 190219e..98b6870 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -948,8 +948,7 @@ static int bcm_enet_open(struct net_device *dev)
 
/* allocate rx dma ring */
size = priv->rx_ring_size * sizeof(struct bcm_enet_desc);
-   p = dma_alloc_coherent(kdev, size, >rx_desc_dma,
-  GFP_KERNEL | __GFP_ZERO);
+   p = dma_zalloc_coherent(kdev, size, >rx_desc_dma, GFP_KERNEL);
if (!p) {
ret = -ENOMEM;
goto out_freeirq_tx;
@@ -960,8 +959,7 @@ static int bcm_enet_open(struct net_device *dev)
 
/* allocate tx dma ring */
size = priv->tx_ring_size * sizeof(struct bcm_enet_desc);
-   p = dma_alloc_coherent(kdev, size, >tx_desc_dma,
-  GFP_KERNEL | __GFP_ZERO);
+   p = dma_zalloc_coherent(kdev, size, >tx_desc_dma, GFP_KERNEL);
if (!p) 

[PATCH net-next] drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

2013-08-26 Thread Joe Perches
__GFP_ZERO is an uncommon flag and perhaps is better
not used.  static inline dma_zalloc_coherent exists
so convert the uses of dma_alloc_coherent with __GFP_ZERO
to the more common kernel style with zalloc.

Remove memset from the static inline dma_zalloc_coherent
and add just one use of __GFP_ZERO instead.

Trivially reduces the size of the existing uses of
dma_zalloc_coherent.

Realign arguments as appropriate.

Signed-off-by: Joe Perches j...@perches.com
---
 drivers/net/ethernet/aeroflex/greth.c  | 12 -
 drivers/net/ethernet/broadcom/bcm63xx_enet.c   |  6 ++---
 drivers/net/ethernet/broadcom/bnx2.c   |  5 ++--
 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h|  5 ++--
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h|  3 +--
 drivers/net/ethernet/broadcom/tg3.c| 23 -
 drivers/net/ethernet/emulex/benet/be_main.c| 18 +++---
 drivers/net/ethernet/faraday/ftgmac100.c   |  7 +++---
 drivers/net/ethernet/faraday/ftmac100.c|  8 +++---
 drivers/net/ethernet/ibm/emac/mal.c|  4 +--
 drivers/net/ethernet/intel/e1000/e1000_ethtool.c   |  8 +++---
 drivers/net/ethernet/intel/ixgb/ixgb_main.c|  4 +--
 drivers/net/ethernet/marvell/pxa168_eth.c  | 19 +++---
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c   |  6 ++---
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c   | 16 ++--
 drivers/net/ethernet/pasemi/pasemi_mac.c   |  7 +++---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c| 29 +++---
 drivers/net/ethernet/sfc/nic.c |  5 ++--
 drivers/net/ethernet/sgi/meth.c|  5 ++--
 drivers/net/ethernet/tundra/tsi108_eth.c   |  8 +++---
 drivers/net/ethernet/xilinx/ll_temac_main.c| 12 -
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c  | 14 +--
 drivers/net/fddi/defxx.c   |  6 ++---
 drivers/net/irda/ali-ircc.c|  8 +++---
 drivers/net/irda/nsc-ircc.c|  8 +++---
 drivers/net/irda/smsc-ircc2.c  |  8 +++---
 drivers/net/irda/via-ircc.c|  8 +++---
 drivers/net/irda/w83977af_ir.c |  8 +++---
 drivers/net/wireless/b43/dma.c |  6 ++---
 drivers/net/wireless/b43legacy/dma.c   |  7 +++---
 include/linux/dma-mapping.h|  5 ++--
 31 files changed, 135 insertions(+), 153 deletions(-)

diff --git a/drivers/net/ethernet/aeroflex/greth.c 
b/drivers/net/ethernet/aeroflex/greth.c
index 7ff4b30..e066945 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -1464,18 +1464,18 @@ static int greth_of_probe(struct platform_device *ofdev)
}
 
/* Allocate TX descriptor ring in coherent memory */
-   greth-tx_bd_base = dma_alloc_coherent(greth-dev, 1024,
-  greth-tx_bd_base_phys,
-  GFP_KERNEL | __GFP_ZERO);
+   greth-tx_bd_base = dma_zalloc_coherent(greth-dev, 1024,
+   greth-tx_bd_base_phys,
+   GFP_KERNEL);
if (!greth-tx_bd_base) {
err = -ENOMEM;
goto error3;
}
 
/* Allocate RX descriptor ring in coherent memory */
-   greth-rx_bd_base = dma_alloc_coherent(greth-dev, 1024,
-  greth-rx_bd_base_phys,
-  GFP_KERNEL | __GFP_ZERO);
+   greth-rx_bd_base = dma_zalloc_coherent(greth-dev, 1024,
+   greth-rx_bd_base_phys,
+   GFP_KERNEL);
if (!greth-rx_bd_base) {
err = -ENOMEM;
goto error4;
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c 
b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index 190219e..98b6870 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -948,8 +948,7 @@ static int bcm_enet_open(struct net_device *dev)
 
/* allocate rx dma ring */
size = priv-rx_ring_size * sizeof(struct bcm_enet_desc);
-   p = dma_alloc_coherent(kdev, size, priv-rx_desc_dma,
-  GFP_KERNEL | __GFP_ZERO);
+   p = dma_zalloc_coherent(kdev, size, priv-rx_desc_dma, GFP_KERNEL);
if (!p) {
ret = -ENOMEM;
goto out_freeirq_tx;
@@ -960,8 +959,7 @@ static int bcm_enet_open(struct net_device *dev)
 
/* allocate tx dma ring */
size = priv-tx_ring_size * sizeof(struct bcm_enet_desc);
-   p = dma_alloc_coherent(kdev, size, priv-tx_desc_dma,
-  GFP_KERNEL | __GFP_ZERO);
+   p = dma_zalloc_coherent(kdev, size,