* [PATCH 00/49] Use vzalloc not vmalloc/kmemset
[not found] <alpine.DEB.2.00.1011031108260.11625@router.home>
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 07/49] drivers/atm: Use vzalloc Joe Perches
` (20 more replies)
0 siblings, 21 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: linux-ia64, linux-kernel, linux-mips, kvm, kvm-ppc, linuxppc-dev,
cbe-oss-dev, linux-s390, amd64-microcode, linux-crypto,
linux-atm-general, netdev, drbd-user, dri-devel, linux-input,
linux-rdma, dm-devel, linux-raid, linux-media, linux-mtd,
e1000-devel, linux-scsi, osst-users, devel, xen-devel,
virtualization, linux-ext4, reiserfs-devel, xfs, codalist,
linux-mm
Converted vmalloc/memset and vmalloc_node/memset to
vzalloc or vzalloc_node using a cocci script and some editing
Reduces text a little bit.
Compiled x86 only.
There are still vmalloc_32 with memset calls still around.
Broken out to multiple patches to cc appropriate maintainers.
Joe Perches (49):
arch/ia64: Use vzalloc
arch/mips: Use vzalloc
arch/powerpc: Use vzalloc
arch/s390: Use vzalloc
arch/x86: Use vzalloc
crypto: Use vzalloc
drivers/atm: Use vzalloc
drivers/block: Use vzalloc
drivers/char: Use vzalloc
drivers/gpu: Use vzalloc
drivers/hid: Use vzalloc
drivers/infiniband: Use vzalloc
drivers/isdn: Use vzalloc
drivers/md: Use vzalloc
drivers/media: Use vzalloc
drivers/mtd: Use vzalloc
drivers/net/cxgb3: Use vzalloc
drivers/net/cxgb4: Use vzalloc
drivers/net/e1000: Use vzalloc
drivers/net/e1000e: Use vzalloc
drivers/net/ehea: Use vzalloc
drivers/net/igb: Use vzalloc
drivers/net/igbvf: Use vzalloc
drivers/net/ixgb: Use vzalloc
drivers/net/ixgbe: Use vzalloc
drivers/net/ixgbevf: Use vzalloc
drivers/net/netxen: Use vzalloc
drivers/net/pch_gbe: Use vzalloc
drivers/net/qlcnic: Use vzalloc
drivers/net/sfc: Use vzalloc
drivers/net/vxge: Use vzalloc
drivers/net/bnx2.c: Use vzalloc
drivers/s390: Use vzalloc
drivers/scsi: Use vzalloc
drivers/staging: Use vzalloc
drivers/video: Use vzalloc
fs/ext4: Use vzalloc
fs/jffs2: Use vzalloc
fs/reiserfs: Use vzalloc
fs/udf: Use vzalloc
fs/xfs: Use vzalloc
include/linux/coda_linux.h: Use vzalloc
kernel: Use vzalloc
mm: Use vzalloc
net/core/pktgen.c: Use vzalloc
net/netfilter: Use vzalloc
net/rds: Use vzalloc
sound/oss/dev_table.c: Use vzalloc
virt/kvm/kvm_main.c: Use vzalloc
arch/ia64/kernel/perfmon.c | 3 +-
arch/mips/sibyte/common/sb_tbprof.c | 3 +-
arch/powerpc/kvm/book3s.c | 6 +--
arch/powerpc/platforms/cell/spufs/lscsa_alloc.c | 3 +-
arch/s390/hypfs/hypfs_diag.c | 3 +-
arch/x86/kernel/microcode_amd.c | 3 +-
arch/x86/kvm/x86.c | 3 +-
arch/x86/mm/pageattr-test.c | 3 +-
crypto/deflate.c | 3 +-
crypto/zlib.c | 3 +-
drivers/atm/idt77252.c | 11 ++++---
drivers/atm/lanai.c | 3 +-
drivers/block/drbd/drbd_bitmap.c | 5 +--
drivers/char/agp/backend.c | 3 +-
drivers/char/mspec.c | 5 +--
drivers/gpu/drm/via/via_dmablit.c | 4 +-
drivers/hid/hid-core.c | 3 +-
drivers/infiniband/hw/amso1100/c2_rnic.c | 5 +--
drivers/infiniband/hw/ehca/ipz_pt_fn.c | 5 +--
drivers/infiniband/hw/ipath/ipath_driver.c | 3 +-
drivers/infiniband/hw/ipath/ipath_file_ops.c | 11 ++-----
drivers/infiniband/hw/ipath/ipath_init_chip.c | 5 +--
drivers/infiniband/hw/qib/qib_init.c | 7 +---
drivers/infiniband/ulp/ipoib/ipoib_cm.c | 10 ++----
drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +-
drivers/isdn/i4l/isdn_common.c | 4 +-
drivers/isdn/mISDN/dsp_core.c | 3 +-
drivers/isdn/mISDN/l1oip_codec.c | 6 +--
drivers/md/dm-log.c | 3 +-
drivers/md/dm-snap-persistent.c | 3 +-
drivers/md/dm-table.c | 4 +--
drivers/media/dvb/ngene/ngene-core.c | 3 +-
drivers/media/video/mx3_camera.c | 3 +-
drivers/media/video/pwc/pwc-if.c | 3 +-
drivers/media/video/videobuf-dma-sg.c | 3 +-
drivers/mtd/nand/nandsim.c | 3 +-
drivers/mtd/ubi/vtbl.c | 6 +--
drivers/net/bnx2.c | 10 +-----
drivers/net/cxgb3/cxgb3_offload.c | 7 ++--
drivers/net/cxgb4/cxgb4_main.c | 7 ++--
drivers/net/e1000/e1000_main.c | 6 +--
drivers/net/e1000e/netdev.c | 6 +--
drivers/net/ehea/ehea_main.c | 4 +--
drivers/net/igb/igb_main.c | 6 +--
drivers/net/igbvf/netdev.c | 6 +--
drivers/net/ixgb/ixgb_main.c | 6 +--
drivers/net/ixgbe/ixgbe_main.c | 10 ++----
drivers/net/ixgbevf/ixgbevf_main.c | 6 +--
drivers/net/netxen/netxen_nic_init.c | 7 +---
drivers/net/pch_gbe/pch_gbe_main.c | 6 +--
drivers/net/qlcnic/qlcnic_init.c | 7 +---
drivers/net/sfc/filter.c | 3 +-
drivers/net/vxge/vxge-config.c | 37 +++++-----------------
drivers/s390/cio/blacklist.c | 3 +-
drivers/scsi/bfa/bfad.c | 3 +-
drivers/scsi/bfa/bfad_debugfs.c | 8 +----
drivers/scsi/cxgbi/libcxgbi.h | 9 ++----
drivers/scsi/osst.c | 3 +-
drivers/scsi/qla2xxx/qla_attr.c | 3 +-
drivers/scsi/qla2xxx/qla_bsg.c | 3 +-
drivers/scsi/scsi_debug.c | 7 +---
drivers/staging/comedi/drivers.c | 4 +--
drivers/staging/rtl8192e/r8192E_core.c | 4 +--
drivers/staging/udlfb/udlfb.c | 5 +--
drivers/staging/xgifb/XGI_main_26.c | 3 +-
drivers/staging/zram/zram_drv.c | 3 +-
drivers/video/arcfb.c | 5 +--
drivers/video/broadsheetfb.c | 4 +--
drivers/video/hecubafb.c | 5 +--
drivers/video/metronomefb.c | 4 +--
drivers/video/xen-fbfront.c | 3 +-
fs/ext4/super.c | 4 +--
fs/jffs2/build.c | 5 +--
fs/reiserfs/journal.c | 9 ++----
fs/reiserfs/resize.c | 4 +--
fs/udf/super.c | 5 +--
fs/xfs/linux-2.6/kmem.h | 7 +----
include/linux/coda_linux.h | 26 ++++++++++------
kernel/profile.c | 6 +--
kernel/relay.c | 4 +--
mm/memcontrol.c | 5 +--
mm/page_cgroup.c | 3 +-
mm/percpu.c | 8 +----
mm/swapfile.c | 3 +-
net/core/pktgen.c | 3 +-
net/netfilter/x_tables.c | 5 +--
net/rds/ib_cm.c | 6 +--
sound/oss/dev_table.c | 6 +--
virt/kvm/kvm_main.c | 13 ++------
89 files changed, 167 insertions(+), 328 deletions(-)
--
1.7.3.1.g432b3.dirty
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 07/49] drivers/atm: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 13/49] drivers/isdn: " Joe Perches
` (19 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Chas Williams, linux-atm-general, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/atm/idt77252.c | 11 ++++++-----
drivers/atm/lanai.c | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index bce5732..8c09e32 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3459,27 +3459,28 @@ init_card(struct atm_dev *dev)
size = sizeof(struct vc_map *) * card->tct_size;
IPRINTK("%s: allocate %d byte for VC map.\n", card->name, size);
- if (NULL == (card->vcs = vmalloc(size))) {
+ card->vcs = vzalloc(size);
+ if (!card->vcs) {
printk("%s: memory allocation failure.\n", card->name);
deinit_card(card);
return -1;
}
- memset(card->vcs, 0, size);
size = sizeof(struct vc_map *) * card->scd_size;
IPRINTK("%s: allocate %d byte for SCD to VC mapping.\n",
card->name, size);
- if (NULL == (card->scd2vc = vmalloc(size))) {
+ card->scd2vc = vzalloc(size);
+ if (!card->scd2vc) {
printk("%s: memory allocation failure.\n", card->name);
deinit_card(card);
return -1;
}
- memset(card->scd2vc, 0, size);
size = sizeof(struct tst_info) * (card->tst_size - 2);
IPRINTK("%s: allocate %d byte for TST to VC mapping.\n",
card->name, size);
- if (NULL == (card->soft_tst = vmalloc(size))) {
+ card->soft_tst = vmalloc(size);
+ if (!card->soft_tst) {
printk("%s: memory allocation failure.\n", card->name);
deinit_card(card);
return -1;
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index cbe15a8..5cec592 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -1457,10 +1457,9 @@ static int __devinit vcc_table_allocate(struct lanai_dev *lanai)
return (lanai->vccs == NULL) ? -ENOMEM : 0;
#else
int bytes = (lanai->num_vci) * sizeof(struct lanai_vcc *);
- lanai->vccs = (struct lanai_vcc **) vmalloc(bytes);
+ lanai->vccs = vzalloc(bytes);
if (unlikely(lanai->vccs == NULL))
return -ENOMEM;
- memset(lanai->vccs, 0, bytes);
return 0;
#endif
}
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 13/49] drivers/isdn: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
2010-11-05 3:07 ` [PATCH 07/49] drivers/atm: Use vzalloc Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 17/49] drivers/net/cxgb3: " Joe Perches
` (18 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Karsten Keil, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/isdn/i4l/isdn_common.c | 4 ++--
drivers/isdn/mISDN/dsp_core.c | 3 +--
drivers/isdn/mISDN/l1oip_codec.c | 6 ++----
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 15632bd..2601d5c 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -2315,11 +2315,11 @@ static int __init isdn_init(void)
int i;
char tmprev[50];
- if (!(dev = vmalloc(sizeof(isdn_dev)))) {
+ dev = vzalloc(sizeof(isdn_dev));
+ if (!dev) {
printk(KERN_WARNING "isdn: Could not allocate device-struct.\n");
return -EIO;
}
- memset((char *) dev, 0, sizeof(isdn_dev));
init_timer(&dev->timer);
dev->timer.function = isdn_timer_funct;
spin_lock_init(&dev->lock);
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
index 6f5b548..a255de5 100644
--- a/drivers/isdn/mISDN/dsp_core.c
+++ b/drivers/isdn/mISDN/dsp_core.c
@@ -1052,12 +1052,11 @@ dspcreate(struct channel_req *crq)
if (crq->protocol != ISDN_P_B_L2DSP
&& crq->protocol != ISDN_P_B_L2DSPHDLC)
return -EPROTONOSUPPORT;
- ndsp = vmalloc(sizeof(struct dsp));
+ ndsp = vzalloc(sizeof(struct dsp));
if (!ndsp) {
printk(KERN_ERR "%s: vmalloc struct dsp failed\n", __func__);
return -ENOMEM;
}
- memset(ndsp, 0, sizeof(struct dsp));
if (dsp_debug & DEBUG_DSP_CTRL)
printk(KERN_DEBUG "%s: creating new dsp instance\n", __func__);
diff --git a/drivers/isdn/mISDN/l1oip_codec.c b/drivers/isdn/mISDN/l1oip_codec.c
index bbfd1b8..5a89972 100644
--- a/drivers/isdn/mISDN/l1oip_codec.c
+++ b/drivers/isdn/mISDN/l1oip_codec.c
@@ -330,14 +330,12 @@ l1oip_4bit_alloc(int ulaw)
return 0;
/* alloc conversion tables */
- table_com = vmalloc(65536);
- table_dec = vmalloc(512);
+ table_com = vzalloc(65536);
+ table_dec = vzalloc(512);
if (!table_com || !table_dec) {
l1oip_4bit_free();
return -ENOMEM;
}
- memset(table_com, 0, 65536);
- memset(table_dec, 0, 512);
/* generate compression table */
i1 = 0;
while (i1 < 256) {
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 17/49] drivers/net/cxgb3: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
2010-11-05 3:07 ` [PATCH 07/49] drivers/atm: Use vzalloc Joe Perches
2010-11-05 3:07 ` [PATCH 13/49] drivers/isdn: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 18/49] drivers/net/cxgb4: " Joe Perches
` (17 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Divy Le Ray, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/cxgb3/cxgb3_offload.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c
index bcf0753..5e632e2 100644
--- a/drivers/net/cxgb3/cxgb3_offload.c
+++ b/drivers/net/cxgb3/cxgb3_offload.c
@@ -1164,12 +1164,11 @@ static void cxgb_redirect(struct dst_entry *old, struct dst_entry *new)
*/
void *cxgb_alloc_mem(unsigned long size)
{
- void *p = kmalloc(size, GFP_KERNEL);
+ void *p = kzalloc(size, GFP_KERNEL);
if (!p)
- p = vmalloc(size);
- if (p)
- memset(p, 0, size);
+ p = vzalloc(size);
+
return p;
}
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 18/49] drivers/net/cxgb4: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (2 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 17/49] drivers/net/cxgb3: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 19/49] drivers/net/e1000: " Joe Perches
` (16 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Dimitris Michailidis, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/cxgb4/cxgb4_main.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
index f17703f..b7758ce 100644
--- a/drivers/net/cxgb4/cxgb4_main.c
+++ b/drivers/net/cxgb4/cxgb4_main.c
@@ -868,12 +868,11 @@ out: release_firmware(fw);
*/
void *t4_alloc_mem(size_t size)
{
- void *p = kmalloc(size, GFP_KERNEL);
+ void *p = kzalloc(size, GFP_KERNEL);
if (!p)
- p = vmalloc(size);
- if (p)
- memset(p, 0, size);
+ p = vzalloc(size);
+
return p;
}
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 19/49] drivers/net/e1000: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (3 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 18/49] drivers/net/cxgb4: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 20/49] drivers/net/e1000e: " Joe Perches
` (15 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
Greg Rose, John Ronciak, Jeff Kirsher, netdev
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/e1000/e1000_main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 4686c39..dcb7f82 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1425,13 +1425,12 @@ static int e1000_setup_tx_resources(struct e1000_adapter *adapter,
int size;
size = sizeof(struct e1000_buffer) * txdr->count;
- txdr->buffer_info = vmalloc(size);
+ txdr->buffer_info = vzalloc(size);
if (!txdr->buffer_info) {
e_err(probe, "Unable to allocate memory for the Tx descriptor "
"ring\n");
return -ENOMEM;
}
- memset(txdr->buffer_info, 0, size);
/* round up to nearest 4K */
@@ -1621,13 +1620,12 @@ static int e1000_setup_rx_resources(struct e1000_adapter *adapter,
int size, desc_len;
size = sizeof(struct e1000_buffer) * rxdr->count;
- rxdr->buffer_info = vmalloc(size);
+ rxdr->buffer_info = vzalloc(size);
if (!rxdr->buffer_info) {
e_err(probe, "Unable to allocate memory for the Rx descriptor "
"ring\n");
return -ENOMEM;
}
- memset(rxdr->buffer_info, 0, size);
desc_len = sizeof(struct e1000_rx_desc);
--
1.7.3.1.g432b3.dirty
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 20/49] drivers/net/e1000e: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (4 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 19/49] drivers/net/e1000: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 21/49] drivers/net/ehea: " Joe Perches
` (14 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
Greg Rose, John Ronciak, Jeff Kirsher, netdev
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/e1000e/netdev.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index c4ca162..9922edb 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2059,10 +2059,9 @@ int e1000e_setup_tx_resources(struct e1000_adapter *adapter)
int err = -ENOMEM, size;
size = sizeof(struct e1000_buffer) * tx_ring->count;
- tx_ring->buffer_info = vmalloc(size);
+ tx_ring->buffer_info = vzalloc(size);
if (!tx_ring->buffer_info)
goto err;
- memset(tx_ring->buffer_info, 0, size);
/* round up to nearest 4K */
tx_ring->size = tx_ring->count * sizeof(struct e1000_tx_desc);
@@ -2095,10 +2094,9 @@ int e1000e_setup_rx_resources(struct e1000_adapter *adapter)
int i, size, desc_len, err = -ENOMEM;
size = sizeof(struct e1000_buffer) * rx_ring->count;
- rx_ring->buffer_info = vmalloc(size);
+ rx_ring->buffer_info = vzalloc(size);
if (!rx_ring->buffer_info)
goto err;
- memset(rx_ring->buffer_info, 0, size);
for (i = 0; i < rx_ring->count; i++) {
buffer_info = &rx_ring->buffer_info[i];
--
1.7.3.1.g432b3.dirty
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 21/49] drivers/net/ehea: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (5 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 20/49] drivers/net/e1000e: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 22/49] drivers/net/igb: " Joe Perches
` (13 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Breno Leitao, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ehea/ehea_main.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 182b2a7..a84c389 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -1496,12 +1496,10 @@ static int ehea_init_q_skba(struct ehea_q_skb_arr *q_skba, int max_q_entries)
{
int arr_size = sizeof(void *) * max_q_entries;
- q_skba->arr = vmalloc(arr_size);
+ q_skba->arr = vzalloc(arr_size);
if (!q_skba->arr)
return -ENOMEM;
- memset(q_skba->arr, 0, arr_size);
-
q_skba->len = max_q_entries;
q_skba->index = 0;
q_skba->os_skbs = 0;
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 22/49] drivers/net/igb: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (6 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 21/49] drivers/net/ehea: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 23/49] drivers/net/igbvf: " Joe Perches
` (12 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
Greg Rose, John Ronciak, Jeff Kirsher, netdev
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/igb/igb_main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 892d196..67ea262 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2436,10 +2436,9 @@ int igb_setup_tx_resources(struct igb_ring *tx_ring)
int size;
size = sizeof(struct igb_buffer) * tx_ring->count;
- tx_ring->buffer_info = vmalloc(size);
+ tx_ring->buffer_info = vzalloc(size);
if (!tx_ring->buffer_info)
goto err;
- memset(tx_ring->buffer_info, 0, size);
/* round up to nearest 4K */
tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc);
@@ -2587,10 +2586,9 @@ int igb_setup_rx_resources(struct igb_ring *rx_ring)
int size, desc_len;
size = sizeof(struct igb_buffer) * rx_ring->count;
- rx_ring->buffer_info = vmalloc(size);
+ rx_ring->buffer_info = vzalloc(size);
if (!rx_ring->buffer_info)
goto err;
- memset(rx_ring->buffer_info, 0, size);
desc_len = sizeof(union e1000_adv_rx_desc);
--
1.7.3.1.g432b3.dirty
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 23/49] drivers/net/igbvf: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (7 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 22/49] drivers/net/igb: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 11:58 ` Rose, Gregory V
2010-11-05 3:07 ` [PATCH 24/49] drivers/net/ixgb: " Joe Perches
` (11 subsequent siblings)
20 siblings, 1 reply; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
Greg Rose, John Ronciak, Jeff Kirsher, netdev
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/igbvf/netdev.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 28af019..08e7459 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -429,10 +429,9 @@ int igbvf_setup_tx_resources(struct igbvf_adapter *adapter,
int size;
size = sizeof(struct igbvf_buffer) * tx_ring->count;
- tx_ring->buffer_info = vmalloc(size);
+ tx_ring->buffer_info = vzalloc(size);
if (!tx_ring->buffer_info)
goto err;
- memset(tx_ring->buffer_info, 0, size);
/* round up to nearest 4K */
tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc);
@@ -469,10 +468,9 @@ int igbvf_setup_rx_resources(struct igbvf_adapter *adapter,
int size, desc_len;
size = sizeof(struct igbvf_buffer) * rx_ring->count;
- rx_ring->buffer_info = vmalloc(size);
+ rx_ring->buffer_info = vzalloc(size);
if (!rx_ring->buffer_info)
goto err;
- memset(rx_ring->buffer_info, 0, size);
desc_len = sizeof(union e1000_adv_rx_desc);
--
1.7.3.1.g432b3.dirty
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 24/49] drivers/net/ixgb: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (8 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 23/49] drivers/net/igbvf: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 25/49] drivers/net/ixgbe: " Joe Perches
` (10 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
Greg Rose, John Ronciak, Jeff Kirsher, netdev
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ixgb/ixgb_main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index caa8192..211a169 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -669,13 +669,12 @@ ixgb_setup_tx_resources(struct ixgb_adapter *adapter)
int size;
size = sizeof(struct ixgb_buffer) * txdr->count;
- txdr->buffer_info = vmalloc(size);
+ txdr->buffer_info = vzalloc(size);
if (!txdr->buffer_info) {
netif_err(adapter, probe, adapter->netdev,
"Unable to allocate transmit descriptor ring memory\n");
return -ENOMEM;
}
- memset(txdr->buffer_info, 0, size);
/* round up to nearest 4K */
@@ -759,13 +758,12 @@ ixgb_setup_rx_resources(struct ixgb_adapter *adapter)
int size;
size = sizeof(struct ixgb_buffer) * rxdr->count;
- rxdr->buffer_info = vmalloc(size);
+ rxdr->buffer_info = vzalloc(size);
if (!rxdr->buffer_info) {
netif_err(adapter, probe, adapter->netdev,
"Unable to allocate receive descriptor ring\n");
return -ENOMEM;
}
- memset(rxdr->buffer_info, 0, size);
/* Round up to nearest 4K */
--
1.7.3.1.g432b3.dirty
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 25/49] drivers/net/ixgbe: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (9 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 24/49] drivers/net/ixgb: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 26/49] drivers/net/ixgbevf: " Joe Perches
` (9 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
Greg Rose, John Ronciak, Jeff Kirsher, netdev
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ixgbe/ixgbe_main.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 2bd3eb4..c10d179 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4970,12 +4970,11 @@ int ixgbe_setup_tx_resources(struct ixgbe_adapter *adapter,
int size;
size = sizeof(struct ixgbe_tx_buffer) * tx_ring->count;
- tx_ring->tx_buffer_info = vmalloc_node(size, tx_ring->numa_node);
+ tx_ring->tx_buffer_info = vzalloc_node(size, tx_ring->numa_node);
if (!tx_ring->tx_buffer_info)
- tx_ring->tx_buffer_info = vmalloc(size);
+ tx_ring->tx_buffer_info = vzalloc(size);
if (!tx_ring->tx_buffer_info)
goto err;
- memset(tx_ring->tx_buffer_info, 0, size);
/* round up to nearest 4K */
tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
@@ -5037,15 +5036,14 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
int size;
size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count;
- rx_ring->rx_buffer_info = vmalloc_node(size, adapter->node);
+ rx_ring->rx_buffer_info = vzalloc_node(size, adapter->node);
if (!rx_ring->rx_buffer_info)
- rx_ring->rx_buffer_info = vmalloc(size);
+ rx_ring->rx_buffer_info = vzalloc(size);
if (!rx_ring->rx_buffer_info) {
e_err(probe, "vmalloc allocation failed for the Rx "
"descriptor ring\n");
goto alloc_failed;
}
- memset(rx_ring->rx_buffer_info, 0, size);
/* Round up to nearest 4K */
rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
--
1.7.3.1.g432b3.dirty
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 26/49] drivers/net/ixgbevf: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (10 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 25/49] drivers/net/ixgbe: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 11:59 ` Rose, Gregory V
2010-11-05 3:07 ` [PATCH 27/49] drivers/net/netxen: " Joe Perches
` (8 subsequent siblings)
20 siblings, 1 reply; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: e1000-devel, Bruce Allan, Jesse Brandeburg, linux-kernel,
Greg Rose, John Ronciak, Jeff Kirsher, netdev
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ixgbevf/ixgbevf_main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index dc03c96..6aeaf54 100644
--- a/drivers/net/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ixgbevf/ixgbevf_main.c
@@ -2488,10 +2488,9 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_adapter *adapter,
int size;
size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count;
- tx_ring->tx_buffer_info = vmalloc(size);
+ tx_ring->tx_buffer_info = vzalloc(size);
if (!tx_ring->tx_buffer_info)
goto err;
- memset(tx_ring->tx_buffer_info, 0, size);
/* round up to nearest 4K */
tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
@@ -2555,14 +2554,13 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_adapter *adapter,
int size;
size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count;
- rx_ring->rx_buffer_info = vmalloc(size);
+ rx_ring->rx_buffer_info = vzalloc(size);
if (!rx_ring->rx_buffer_info) {
hw_dbg(&adapter->hw,
"Unable to vmalloc buffer memory for "
"the receive descriptor ring\n");
goto alloc_failed;
}
- memset(rx_ring->rx_buffer_info, 0, size);
/* Round up to nearest 4K */
rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
--
1.7.3.1.g432b3.dirty
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 27/49] drivers/net/netxen: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (11 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 26/49] drivers/net/ixgbevf: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 5:18 ` Amit Salecha
2010-11-05 3:07 ` [PATCH 28/49] drivers/net/pch_gbe: " Joe Perches
` (7 subsequent siblings)
20 siblings, 1 reply; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Amit Kumar Salecha, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/netxen/netxen_nic_init.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 95fe552..731077d 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -214,13 +214,12 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
tx_ring->num_desc = adapter->num_txd;
tx_ring->txq = netdev_get_tx_queue(netdev, 0);
- cmd_buf_arr = vmalloc(TX_BUFF_RINGSIZE(tx_ring));
+ cmd_buf_arr = vzalloc(TX_BUFF_RINGSIZE(tx_ring));
if (cmd_buf_arr == NULL) {
dev_err(&pdev->dev, "%s: failed to allocate cmd buffer ring\n",
netdev->name);
goto err_out;
}
- memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring));
tx_ring->cmd_buf_arr = cmd_buf_arr;
recv_ctx = &adapter->recv_ctx;
@@ -279,8 +278,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
break;
}
- rds_ring->rx_buf_arr = (struct netxen_rx_buffer *)
- vmalloc(RCV_BUFF_RINGSIZE(rds_ring));
+ rds_ring->rx_buf_arr = vzalloc(RCV_BUFF_RINGSIZE(rds_ring));
if (rds_ring->rx_buf_arr == NULL) {
printk(KERN_ERR "%s: Failed to allocate "
"rx buffer ring %d\n",
@@ -288,7 +286,6 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
/* free whatever was already allocated */
goto err_out;
}
- memset(rds_ring->rx_buf_arr, 0, RCV_BUFF_RINGSIZE(rds_ring));
INIT_LIST_HEAD(&rds_ring->free_list);
/*
* Now go through all of them, set reference handles
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 28/49] drivers/net/pch_gbe: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (12 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 27/49] drivers/net/netxen: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 29/49] drivers/net/qlcnic: " Joe Perches
` (6 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina; +Cc: netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/pch_gbe/pch_gbe_main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index 472056b..afb7506 100644
--- a/drivers/net/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/pch_gbe/pch_gbe_main.c
@@ -1523,12 +1523,11 @@ int pch_gbe_setup_tx_resources(struct pch_gbe_adapter *adapter,
int desNo;
size = (int)sizeof(struct pch_gbe_buffer) * tx_ring->count;
- tx_ring->buffer_info = vmalloc(size);
+ tx_ring->buffer_info = vzalloc(size);
if (!tx_ring->buffer_info) {
pr_err("Unable to allocate memory for the buffer infomation\n");
return -ENOMEM;
}
- memset(tx_ring->buffer_info, 0, size);
tx_ring->size = tx_ring->count * (int)sizeof(struct pch_gbe_tx_desc);
@@ -1573,12 +1572,11 @@ int pch_gbe_setup_rx_resources(struct pch_gbe_adapter *adapter,
int desNo;
size = (int)sizeof(struct pch_gbe_buffer) * rx_ring->count;
- rx_ring->buffer_info = vmalloc(size);
+ rx_ring->buffer_info = vzalloc(size);
if (!rx_ring->buffer_info) {
pr_err("Unable to allocate memory for the receive descriptor ring\n");
return -ENOMEM;
}
- memset(rx_ring->buffer_info, 0, size);
rx_ring->size = rx_ring->count * (int)sizeof(struct pch_gbe_rx_desc);
rx_ring->desc = dma_alloc_coherent(&pdev->dev, rx_ring->size,
&rx_ring->dma, GFP_KERNEL);
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 29/49] drivers/net/qlcnic: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (13 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 28/49] drivers/net/pch_gbe: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 30/49] drivers/net/sfc: " Joe Perches
` (5 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: Amit Kumar Salecha, Anirban Chakraborty, linux-driver, netdev,
linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/qlcnic/qlcnic_init.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 0d180c6..c5ea2f4 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -236,12 +236,11 @@ int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter)
tx_ring->num_desc = adapter->num_txd;
tx_ring->txq = netdev_get_tx_queue(netdev, 0);
- cmd_buf_arr = vmalloc(TX_BUFF_RINGSIZE(tx_ring));
+ cmd_buf_arr = vzalloc(TX_BUFF_RINGSIZE(tx_ring));
if (cmd_buf_arr == NULL) {
dev_err(&netdev->dev, "failed to allocate cmd buffer ring\n");
goto err_out;
}
- memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring));
tx_ring->cmd_buf_arr = cmd_buf_arr;
recv_ctx = &adapter->recv_ctx;
@@ -275,14 +274,12 @@ int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter)
rds_ring->dma_size + NET_IP_ALIGN;
break;
}
- rds_ring->rx_buf_arr = (struct qlcnic_rx_buffer *)
- vmalloc(RCV_BUFF_RINGSIZE(rds_ring));
+ rds_ring->rx_buf_arr = vzalloc(RCV_BUFF_RINGSIZE(rds_ring));
if (rds_ring->rx_buf_arr == NULL) {
dev_err(&netdev->dev, "Failed to allocate "
"rx buffer ring %d\n", ring);
goto err_out;
}
- memset(rds_ring->rx_buf_arr, 0, RCV_BUFF_RINGSIZE(rds_ring));
INIT_LIST_HEAD(&rds_ring->free_list);
/*
* Now go through all of them, set reference handles
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 30/49] drivers/net/sfc: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (14 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 29/49] drivers/net/qlcnic: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 31/49] drivers/net/vxge: " Joe Perches
` (4 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: Solarflare linux maintainers, Steve Hodgson, Ben Hutchings,
netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/sfc/filter.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/sfc/filter.c b/drivers/net/sfc/filter.c
index 52cb608..44500b5 100644
--- a/drivers/net/sfc/filter.c
+++ b/drivers/net/sfc/filter.c
@@ -428,10 +428,9 @@ int efx_probe_filters(struct efx_nic *efx)
GFP_KERNEL);
if (!table->used_bitmap)
goto fail;
- table->spec = vmalloc(table->size * sizeof(*table->spec));
+ table->spec = vzalloc(table->size * sizeof(*table->spec));
if (!table->spec)
goto fail;
- memset(table->spec, 0, table->size * sizeof(*table->spec));
}
return 0;
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 31/49] drivers/net/vxge: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (15 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 30/49] drivers/net/sfc: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:07 ` [PATCH 32/49] drivers/net/bnx2.c: " Joe Perches
` (3 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina
Cc: Ramkrishna Vepa, Sivakumar Subramani, Sreenivasa Honnur,
Jon Mason, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/vxge/vxge-config.c | 37 +++++++++----------------------------
1 files changed, 9 insertions(+), 28 deletions(-)
diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
index 906a3ca3..0c0a4e4 100644
--- a/drivers/net/vxge/vxge-config.c
+++ b/drivers/net/vxge/vxge-config.c
@@ -776,14 +776,12 @@ vxge_hw_device_initialize(
if (status != VXGE_HW_OK)
goto exit;
- hldev = (struct __vxge_hw_device *)
- vmalloc(sizeof(struct __vxge_hw_device));
+ hldev = vzalloc(sizeof(struct __vxge_hw_device));
if (hldev == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto exit;
}
- memset(hldev, 0, sizeof(struct __vxge_hw_device));
hldev->magic = VXGE_HW_DEVICE_MAGIC;
vxge_hw_device_debug_set(hldev, VXGE_ERR, VXGE_COMPONENT_ALL);
@@ -1627,15 +1625,12 @@ __vxge_hw_mempool_grow(struct vxge_hw_mempool *mempool, u32 num_allocate,
* allocate new memblock and its private part at once.
* This helps to minimize memory usage a lot. */
mempool->memblocks_priv_arr[i] =
- vmalloc(mempool->items_priv_size * n_items);
+ vzalloc(mempool->items_priv_size * n_items);
if (mempool->memblocks_priv_arr[i] == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto exit;
}
- memset(mempool->memblocks_priv_arr[i], 0,
- mempool->items_priv_size * n_items);
-
/* allocate DMA-capable memblock */
mempool->memblocks_arr[i] =
__vxge_hw_blockpool_malloc(mempool->devh,
@@ -1707,13 +1702,11 @@ __vxge_hw_mempool_create(
goto exit;
}
- mempool = (struct vxge_hw_mempool *)
- vmalloc(sizeof(struct vxge_hw_mempool));
+ mempool = vzalloc(sizeof(struct vxge_hw_mempool));
if (mempool == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto exit;
}
- memset(mempool, 0, sizeof(struct vxge_hw_mempool));
mempool->devh = devh;
mempool->memblock_size = memblock_size;
@@ -1733,31 +1726,27 @@ __vxge_hw_mempool_create(
/* allocate array of memblocks */
mempool->memblocks_arr =
- (void **) vmalloc(sizeof(void *) * mempool->memblocks_max);
+ vzalloc(sizeof(void *) * mempool->memblocks_max);
if (mempool->memblocks_arr == NULL) {
__vxge_hw_mempool_destroy(mempool);
status = VXGE_HW_ERR_OUT_OF_MEMORY;
mempool = NULL;
goto exit;
}
- memset(mempool->memblocks_arr, 0,
- sizeof(void *) * mempool->memblocks_max);
/* allocate array of private parts of items per memblocks */
mempool->memblocks_priv_arr =
- (void **) vmalloc(sizeof(void *) * mempool->memblocks_max);
+ vzalloc(sizeof(void *) * mempool->memblocks_max);
if (mempool->memblocks_priv_arr == NULL) {
__vxge_hw_mempool_destroy(mempool);
status = VXGE_HW_ERR_OUT_OF_MEMORY;
mempool = NULL;
goto exit;
}
- memset(mempool->memblocks_priv_arr, 0,
- sizeof(void *) * mempool->memblocks_max);
/* allocate array of memblocks DMA objects */
- mempool->memblocks_dma_arr = (struct vxge_hw_mempool_dma *)
- vmalloc(sizeof(struct vxge_hw_mempool_dma) *
+ mempool->memblocks_dma_arr =
+ vzalloc(sizeof(struct vxge_hw_mempool_dma) *
mempool->memblocks_max);
if (mempool->memblocks_dma_arr == NULL) {
@@ -1766,20 +1755,15 @@ __vxge_hw_mempool_create(
mempool = NULL;
goto exit;
}
- memset(mempool->memblocks_dma_arr, 0,
- sizeof(struct vxge_hw_mempool_dma) *
- mempool->memblocks_max);
/* allocate hash array of items */
- mempool->items_arr =
- (void **) vmalloc(sizeof(void *) * mempool->items_max);
+ mempool->items_arr = vzalloc(sizeof(void *) * mempool->items_max);
if (mempool->items_arr == NULL) {
__vxge_hw_mempool_destroy(mempool);
status = VXGE_HW_ERR_OUT_OF_MEMORY;
mempool = NULL;
goto exit;
}
- memset(mempool->items_arr, 0, sizeof(void *) * mempool->items_max);
/* calculate initial number of memblocks */
memblocks_to_allocate = (mempool->items_initial +
@@ -4242,15 +4226,12 @@ vxge_hw_vpath_open(struct __vxge_hw_device *hldev,
if (status != VXGE_HW_OK)
goto vpath_open_exit1;
- vp = (struct __vxge_hw_vpath_handle *)
- vmalloc(sizeof(struct __vxge_hw_vpath_handle));
+ vp = vzalloc(sizeof(struct __vxge_hw_vpath_handle));
if (vp == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto vpath_open_exit2;
}
- memset(vp, 0, sizeof(struct __vxge_hw_vpath_handle));
-
vp->vpath = vpath;
if (vpath->vp_config->fifo.enable == VXGE_HW_FIFO_ENABLE) {
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 32/49] drivers/net/bnx2.c: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (16 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 31/49] drivers/net/vxge: " Joe Perches
@ 2010-11-05 3:07 ` Joe Perches
2010-11-05 3:08 ` [PATCH 45/49] net/core/pktgen.c: " Joe Perches
` (2 subsequent siblings)
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:07 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Michael Chan, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/bnx2.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 062600b..aba4d0f 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -766,13 +766,10 @@ bnx2_alloc_rx_mem(struct bnx2 *bp)
int j;
rxr->rx_buf_ring =
- vmalloc(SW_RXBD_RING_SIZE * bp->rx_max_ring);
+ vzalloc(SW_RXBD_RING_SIZE * bp->rx_max_ring);
if (rxr->rx_buf_ring == NULL)
return -ENOMEM;
- memset(rxr->rx_buf_ring, 0,
- SW_RXBD_RING_SIZE * bp->rx_max_ring);
-
for (j = 0; j < bp->rx_max_ring; j++) {
rxr->rx_desc_ring[j] =
dma_alloc_coherent(&bp->pdev->dev,
@@ -785,13 +782,10 @@ bnx2_alloc_rx_mem(struct bnx2 *bp)
}
if (bp->rx_pg_ring_size) {
- rxr->rx_pg_ring = vmalloc(SW_RXPG_RING_SIZE *
+ rxr->rx_pg_ring = vzalloc(SW_RXPG_RING_SIZE *
bp->rx_max_pg_ring);
if (rxr->rx_pg_ring == NULL)
return -ENOMEM;
-
- memset(rxr->rx_pg_ring, 0, SW_RXPG_RING_SIZE *
- bp->rx_max_pg_ring);
}
for (j = 0; j < bp->rx_max_pg_ring; j++) {
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 45/49] net/core/pktgen.c: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (17 preceding siblings ...)
2010-11-05 3:07 ` [PATCH 32/49] drivers/net/bnx2.c: " Joe Perches
@ 2010-11-05 3:08 ` Joe Perches
2010-11-05 3:08 ` [PATCH 46/49] net/netfilter: " Joe Perches
2010-11-05 3:08 ` [PATCH 47/49] net/rds: " Joe Perches
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:08 UTC (permalink / raw)
To: Jiri Kosina; +Cc: David S. Miller, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
net/core/pktgen.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index fbce4b0..ccca6cd 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3706,13 +3706,12 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
return -ENOMEM;
strcpy(pkt_dev->odevname, ifname);
- pkt_dev->flows = vmalloc_node(MAX_CFLOWS * sizeof(struct flow_state),
+ pkt_dev->flows = vzalloc_node(MAX_CFLOWS * sizeof(struct flow_state),
node);
if (pkt_dev->flows == NULL) {
kfree(pkt_dev);
return -ENOMEM;
}
- memset(pkt_dev->flows, 0, MAX_CFLOWS * sizeof(struct flow_state));
pkt_dev->removal_mark = 0;
pkt_dev->min_pkt_size = ETH_ZLEN;
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 46/49] net/netfilter: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (18 preceding siblings ...)
2010-11-05 3:08 ` [PATCH 45/49] net/core/pktgen.c: " Joe Perches
@ 2010-11-05 3:08 ` Joe Perches
2010-11-05 6:30 ` Eric Dumazet
2010-11-05 3:08 ` [PATCH 47/49] net/rds: " Joe Perches
20 siblings, 1 reply; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:08 UTC (permalink / raw)
To: Jiri Kosina
Cc: Patrick McHardy, David S. Miller, netfilter-devel, netfilter,
coreteam, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
net/netfilter/x_tables.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 8046350..89e8895 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -753,12 +753,11 @@ static int xt_jumpstack_alloc(struct xt_table_info *i)
size = sizeof(void **) * nr_cpu_ids;
if (size > PAGE_SIZE)
- i->jumpstack = vmalloc(size);
+ i->jumpstack = vzalloc(size);
else
- i->jumpstack = kmalloc(size, GFP_KERNEL);
+ i->jumpstack = kzalloc(size, GFP_KERNEL);
if (i->jumpstack == NULL)
return -ENOMEM;
- memset(i->jumpstack, 0, size);
i->stacksize *= xt_jumpstack_multiplier;
size = sizeof(void *) * i->stacksize;
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 47/49] net/rds: Use vzalloc
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
` (19 preceding siblings ...)
2010-11-05 3:08 ` [PATCH 46/49] net/netfilter: " Joe Perches
@ 2010-11-05 3:08 ` Joe Perches
20 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 3:08 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Andy Grover, David S. Miller, rds-devel, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
net/rds/ib_cm.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index ee369d2..cc6b073 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -374,23 +374,21 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
goto out;
}
- ic->i_sends = vmalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
+ ic->i_sends = vzalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
ibdev_to_node(dev));
if (!ic->i_sends) {
ret = -ENOMEM;
rdsdebug("send allocation failed\n");
goto out;
}
- memset(ic->i_sends, 0, ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work));
- ic->i_recvs = vmalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
+ ic->i_recvs = vzalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
ibdev_to_node(dev));
if (!ic->i_recvs) {
ret = -ENOMEM;
rdsdebug("recv allocation failed\n");
goto out;
}
- memset(ic->i_recvs, 0, ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work));
rds_ib_recv_init_ack(ic);
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related [flat|nested] 31+ messages in thread
* RE: [PATCH 27/49] drivers/net/netxen: Use vzalloc
2010-11-05 3:07 ` [PATCH 27/49] drivers/net/netxen: " Joe Perches
@ 2010-11-05 5:18 ` Amit Salecha
0 siblings, 0 replies; 31+ messages in thread
From: Amit Salecha @ 2010-11-05 5:18 UTC (permalink / raw)
To: Joe Perches, Jiri Kosina
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
> From: Joe Perches [joe@perches.com]
> Sent: Friday, November 05, 2010 8:37 AM
> To: Jiri Kosina
> Cc: Amit Salecha; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH 27/49] drivers/net/netxen: Use vzalloc
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/netxen/netxen_nic_init.c | 7 ++-----
> files changed, 2 insertions(+), 5 deletions(-)
Thanks.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 46/49] net/netfilter: Use vzalloc
2010-11-05 3:08 ` [PATCH 46/49] net/netfilter: " Joe Perches
@ 2010-11-05 6:30 ` Eric Dumazet
2010-11-05 6:55 ` Joe Perches
0 siblings, 1 reply; 31+ messages in thread
From: Eric Dumazet @ 2010-11-05 6:30 UTC (permalink / raw)
To: Joe Perches, Jesper Juhl
Cc: Jiri Kosina, Patrick McHardy, David S. Miller, netfilter-devel,
netfilter, coreteam, netdev, linux-kernel
Le jeudi 04 novembre 2010 à 20:08 -0700, Joe Perches a écrit :
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> net/netfilter/x_tables.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
So many 'vzalloc' patches for net tree...
I had _one_ patch, waiting that David actually had vzalloc() in its tree
before sending it.
Given Jesper Juhl was doing this work, could you please take another
one, please ?
For example, explaining him how to use other tools than "bash+egrep
+manual inspection" as he mentioned in a previous mail.
Really Joe, your behavior should be smarter than that.
Thanks
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 46/49] net/netfilter: Use vzalloc
2010-11-05 6:30 ` Eric Dumazet
@ 2010-11-05 6:55 ` Joe Perches
2010-11-05 7:16 ` Eric Dumazet
2010-11-05 15:10 ` Jiri Kosina
0 siblings, 2 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 6:55 UTC (permalink / raw)
To: Eric Dumazet
Cc: Jesper Juhl, Jiri Kosina, Patrick McHardy, David S. Miller,
netfilter-devel, netfilter, coreteam, netdev, linux-kernel
On Fri, 2010-11-05 at 07:30 +0100, Eric Dumazet wrote:
> I had _one_ patch, waiting that David actually had vzalloc() in its tree
> before sending it.
Fine by me, use yours.
> Given Jesper Juhl was doing this work, could you please take another
> one, please ?
> For example, explaining him how to use other tools than "bash+egrep
> +manual inspection" as he mentioned in a previous mail.
Jesper Juhl was both pointed at the cocci docs and
given a cocci script. He said he'd investigate it
when he could. I trust he will get to it.
I think that for this sort of patchset, grep and
manual inspection works just as well as spatch
and likely better because a simple cocci script
doesn't transform code like:
if (size > PAGE_SIZE)
ptr = vmalloc(size);
else
ptr = kmalloc(size, GFP);
if (ptr)
memset(ptr, 0, size);
I did say in the 00 cover that this was broken up
just to cc the maintainers of each block.
I also think a single rolled-up single patch is good.
I believe Jiri Kosina can easily apply all these
individual patches as a single patch if he chooses.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 46/49] net/netfilter: Use vzalloc
2010-11-05 6:55 ` Joe Perches
@ 2010-11-05 7:16 ` Eric Dumazet
2010-11-05 17:01 ` Jesper Juhl
2010-11-05 15:10 ` Jiri Kosina
1 sibling, 1 reply; 31+ messages in thread
From: Eric Dumazet @ 2010-11-05 7:16 UTC (permalink / raw)
To: Joe Perches
Cc: Jesper Juhl, Jiri Kosina, Patrick McHardy, David S. Miller,
netfilter-devel, netfilter, coreteam, netdev, linux-kernel
Le jeudi 04 novembre 2010 à 23:55 -0700, Joe Perches a écrit :
> On Fri, 2010-11-05 at 07:30 +0100, Eric Dumazet wrote:
> > I had _one_ patch, waiting that David actually had vzalloc() in its tree
> > before sending it.
>
> Fine by me, use yours.
I dont care at all, only to say that David tree was not ready yet.
>
> > Given Jesper Juhl was doing this work, could you please take another
> > one, please ?
> > For example, explaining him how to use other tools than "bash+egrep
> > +manual inspection" as he mentioned in a previous mail.
>
> Jesper Juhl was both pointed at the cocci docs and
> given a cocci script. He said he'd investigate it
> when he could. I trust he will get to it.
>
Yes, yet you posted patches, knowing he was working on the _same_
subject.
I remember other occurrences of such behavior.
I find this behavior very unfriendly, time consuming, and not useful.
We try to work together, to increase our common knowledge, not to throw
a bunch of patches "just because I know better than you"
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 23/49] drivers/net/igbvf: Use vzalloc
2010-11-05 3:07 ` [PATCH 23/49] drivers/net/igbvf: " Joe Perches
@ 2010-11-05 11:58 ` Rose, Gregory V
0 siblings, 0 replies; 31+ messages in thread
From: Rose, Gregory V @ 2010-11-05 11:58 UTC (permalink / raw)
To: Joe Perches, Jiri Kosina
Cc: Kirsher, Jeffrey T, Brandeburg, Jesse, Allan, Bruce W,
Wyborny, Carolyn, Skidmore, Donald C, Waskiewicz Jr, Peter P,
Duyck, Alexander H, Ronciak, John,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Thursday, November 04, 2010 8:08 PM
> To: Jiri Kosina
> Cc: Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W; Wyborny,
> Carolyn; Skidmore, Donald C; Rose, Gregory V; Waskiewicz Jr, Peter P;
> Duyck, Alexander H; Ronciak, John; e1000-devel@lists.sourceforge.net;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH 23/49] drivers/net/igbvf: Use vzalloc
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/igbvf/netdev.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
> index 28af019..08e7459 100644
> --- a/drivers/net/igbvf/netdev.c
> +++ b/drivers/net/igbvf/netdev.c
> @@ -429,10 +429,9 @@ int igbvf_setup_tx_resources(struct igbvf_adapter
> *adapter,
> int size;
>
> size = sizeof(struct igbvf_buffer) * tx_ring->count;
> - tx_ring->buffer_info = vmalloc(size);
> + tx_ring->buffer_info = vzalloc(size);
> if (!tx_ring->buffer_info)
> goto err;
> - memset(tx_ring->buffer_info, 0, size);
>
> /* round up to nearest 4K */
> tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc);
> @@ -469,10 +468,9 @@ int igbvf_setup_rx_resources(struct igbvf_adapter
> *adapter,
> int size, desc_len;
>
> size = sizeof(struct igbvf_buffer) * rx_ring->count;
> - rx_ring->buffer_info = vmalloc(size);
> + rx_ring->buffer_info = vzalloc(size);
> if (!rx_ring->buffer_info)
> goto err;
> - memset(rx_ring->buffer_info, 0, size);
>
> desc_len = sizeof(union e1000_adv_rx_desc);
>
> --
> 1.7.3.1.g432b3.dirty
Acked By: Greg Rose <Gregory.v.rose@intel.com>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 26/49] drivers/net/ixgbevf: Use vzalloc
2010-11-05 3:07 ` [PATCH 26/49] drivers/net/ixgbevf: " Joe Perches
@ 2010-11-05 11:59 ` Rose, Gregory V
0 siblings, 0 replies; 31+ messages in thread
From: Rose, Gregory V @ 2010-11-05 11:59 UTC (permalink / raw)
To: Joe Perches, Jiri Kosina
Cc: e1000-devel@lists.sourceforge.net, Allan, Bruce W,
Brandeburg, Jesse, linux-kernel@vger.kernel.org, Ronciak, John,
Kirsher, Jeffrey T, netdev@vger.kernel.org
> -----Original Message-----
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Thursday, November 04, 2010 8:08 PM
> To: Jiri Kosina
> Cc: Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W; Wyborny,
> Carolyn; Skidmore, Donald C; Rose, Gregory V; Waskiewicz Jr, Peter P;
> Duyck, Alexander H; Ronciak, John; e1000-devel@lists.sourceforge.net;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH 26/49] drivers/net/ixgbevf: Use vzalloc
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/ixgbevf/ixgbevf_main.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ixgbevf/ixgbevf_main.c
> b/drivers/net/ixgbevf/ixgbevf_main.c
> index dc03c96..6aeaf54 100644
> --- a/drivers/net/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ixgbevf/ixgbevf_main.c
> @@ -2488,10 +2488,9 @@ int ixgbevf_setup_tx_resources(struct
> ixgbevf_adapter *adapter,
> int size;
>
> size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count;
> - tx_ring->tx_buffer_info = vmalloc(size);
> + tx_ring->tx_buffer_info = vzalloc(size);
> if (!tx_ring->tx_buffer_info)
> goto err;
> - memset(tx_ring->tx_buffer_info, 0, size);
>
> /* round up to nearest 4K */
> tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
> @@ -2555,14 +2554,13 @@ int ixgbevf_setup_rx_resources(struct
> ixgbevf_adapter *adapter,
> int size;
>
> size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count;
> - rx_ring->rx_buffer_info = vmalloc(size);
> + rx_ring->rx_buffer_info = vzalloc(size);
> if (!rx_ring->rx_buffer_info) {
> hw_dbg(&adapter->hw,
> "Unable to vmalloc buffer memory for "
> "the receive descriptor ring\n");
> goto alloc_failed;
> }
> - memset(rx_ring->rx_buffer_info, 0, size);
>
> /* Round up to nearest 4K */
> rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
> --
> 1.7.3.1.g432b3.dirty
Acked By: Greg Rose <Gregory.v.rose@intel.com>
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 46/49] net/netfilter: Use vzalloc
2010-11-05 6:55 ` Joe Perches
2010-11-05 7:16 ` Eric Dumazet
@ 2010-11-05 15:10 ` Jiri Kosina
2010-11-05 15:25 ` Joe Perches
1 sibling, 1 reply; 31+ messages in thread
From: Jiri Kosina @ 2010-11-05 15:10 UTC (permalink / raw)
To: Joe Perches
Cc: Eric Dumazet, Jesper Juhl, Patrick McHardy, David S. Miller,
netfilter-devel, netfilter, coreteam, netdev, linux-kernel
On Thu, 4 Nov 2010, Joe Perches wrote:
> I also think a single rolled-up single patch is good.
>
> I believe Jiri Kosina can easily apply all these individual patches as a
> single patch if he chooses.
I will, after this settles a little bit (the same for the WARN series).
I prefer waiting a bit before applying your patches usually.
First to see what lands in linux-next through maintainer's trees, second
to gather Acks.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 46/49] net/netfilter: Use vzalloc
2010-11-05 15:10 ` Jiri Kosina
@ 2010-11-05 15:25 ` Joe Perches
0 siblings, 0 replies; 31+ messages in thread
From: Joe Perches @ 2010-11-05 15:25 UTC (permalink / raw)
To: Jiri Kosina
Cc: Eric Dumazet, Jesper Juhl, Patrick McHardy, David S. Miller,
netfilter-devel, netfilter, coreteam, netdev, linux-kernel
On Fri, 2010-11-05 at 11:10 -0400, Jiri Kosina wrote:
> On Thu, 4 Nov 2010, Joe Perches wrote:
> > I also think a single rolled-up single patch is good.
> > I believe Jiri Kosina can easily apply all these individual patches as a
> > single patch if he chooses.
> I will, after this settles a little bit (the same for the WARN series).
> I prefer waiting a bit before applying your patches usually.
> First to see what lands in linux-next through maintainer's trees, second
> to gather Acks.
I think that's the right way to do these
sorts of trivial changes too.
Individual patches cc'd to maintainers for
feedback, improvement, acks or to be directly
applied to their trees, followed by a longish
delay before any unapplied patches are taken
up as a single patch by your trivial queue.
Thanks for doing that work Jiri.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 46/49] net/netfilter: Use vzalloc
2010-11-05 7:16 ` Eric Dumazet
@ 2010-11-05 17:01 ` Jesper Juhl
0 siblings, 0 replies; 31+ messages in thread
From: Jesper Juhl @ 2010-11-05 17:01 UTC (permalink / raw)
To: Eric Dumazet, Joe Perches
Cc: Jiri Kosina, Patrick McHardy, David S. Miller, netfilter-devel,
netfilter, coreteam, netdev, linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2136 bytes --]
On Fri, 5 Nov 2010, Eric Dumazet wrote:
> Le jeudi 04 novembre 2010 à 23:55 -0700, Joe Perches a écrit :
> > On Fri, 2010-11-05 at 07:30 +0100, Eric Dumazet wrote:
> > > I had _one_ patch, waiting that David actually had vzalloc() in its tree
> > > before sending it.
> >
> > Fine by me, use yours.
>
> I dont care at all, only to say that David tree was not ready yet.
>
>
> >
> > > Given Jesper Juhl was doing this work, could you please take another
> > > one, please ?
> > > For example, explaining him how to use other tools than "bash+egrep
> > > +manual inspection" as he mentioned in a previous mail.
> >
> > Jesper Juhl was both pointed at the cocci docs and
> > given a cocci script. He said he'd investigate it
> > when he could. I trust he will get to it.
> >
>
> Yes, yet you posted patches, knowing he was working on the _same_
> subject.
>
And I will get to look at cocci and spatch, they are definately tools that
I want in my arsenal.
> I remember other occurrences of such behavior.
>
> I find this behavior very unfriendly, time consuming, and not useful.
>
> We try to work together, to increase our common knowledge, not to throw
> a bunch of patches "just because I know better than you"
>
To be completely honest, I did get the feeling that the task I'd set for
myself and was having fun doing in the little spare time I have got
hijacked and I did waste about an hour and a half doing a few more
cleanups before I saw the patchset on lkml.
But on the other hand, the most important thing is that it gets done, not
who ends up doing it - especially since it's such a trivial cleanup, so I
choose to see it as my initial patches just getting the ball rolling.
It would have been nice with at least an email along the lines of "I
know how we can do all those patches in a jiffy, mind if I just go along
and do that?", but I'll live. There's plenty of other stuff to do :-)
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Plain text mails only, please http://www.expita.com/nomime.html
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2010-11-05 17:01 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <alpine.DEB.2.00.1011031108260.11625@router.home>
2010-11-05 3:07 ` [PATCH 00/49] Use vzalloc not vmalloc/kmemset Joe Perches
2010-11-05 3:07 ` [PATCH 07/49] drivers/atm: Use vzalloc Joe Perches
2010-11-05 3:07 ` [PATCH 13/49] drivers/isdn: " Joe Perches
2010-11-05 3:07 ` [PATCH 17/49] drivers/net/cxgb3: " Joe Perches
2010-11-05 3:07 ` [PATCH 18/49] drivers/net/cxgb4: " Joe Perches
2010-11-05 3:07 ` [PATCH 19/49] drivers/net/e1000: " Joe Perches
2010-11-05 3:07 ` [PATCH 20/49] drivers/net/e1000e: " Joe Perches
2010-11-05 3:07 ` [PATCH 21/49] drivers/net/ehea: " Joe Perches
2010-11-05 3:07 ` [PATCH 22/49] drivers/net/igb: " Joe Perches
2010-11-05 3:07 ` [PATCH 23/49] drivers/net/igbvf: " Joe Perches
2010-11-05 11:58 ` Rose, Gregory V
2010-11-05 3:07 ` [PATCH 24/49] drivers/net/ixgb: " Joe Perches
2010-11-05 3:07 ` [PATCH 25/49] drivers/net/ixgbe: " Joe Perches
2010-11-05 3:07 ` [PATCH 26/49] drivers/net/ixgbevf: " Joe Perches
2010-11-05 11:59 ` Rose, Gregory V
2010-11-05 3:07 ` [PATCH 27/49] drivers/net/netxen: " Joe Perches
2010-11-05 5:18 ` Amit Salecha
2010-11-05 3:07 ` [PATCH 28/49] drivers/net/pch_gbe: " Joe Perches
2010-11-05 3:07 ` [PATCH 29/49] drivers/net/qlcnic: " Joe Perches
2010-11-05 3:07 ` [PATCH 30/49] drivers/net/sfc: " Joe Perches
2010-11-05 3:07 ` [PATCH 31/49] drivers/net/vxge: " Joe Perches
2010-11-05 3:07 ` [PATCH 32/49] drivers/net/bnx2.c: " Joe Perches
2010-11-05 3:08 ` [PATCH 45/49] net/core/pktgen.c: " Joe Perches
2010-11-05 3:08 ` [PATCH 46/49] net/netfilter: " Joe Perches
2010-11-05 6:30 ` Eric Dumazet
2010-11-05 6:55 ` Joe Perches
2010-11-05 7:16 ` Eric Dumazet
2010-11-05 17:01 ` Jesper Juhl
2010-11-05 15:10 ` Jiri Kosina
2010-11-05 15:25 ` Joe Perches
2010-11-05 3:08 ` [PATCH 47/49] net/rds: " Joe Perches
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).