From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: [TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc Date: Sat, 28 May 2011 10:36:20 -0700 Message-ID: Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, xfs@oss.sgi.com To: linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, drbd-user@lists.linbit.com, dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-mtd@lists.infradead.org, linux-s Return-path: Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org Resubmittal of patches from November 2010 and a few new ones. Joe Perches (15): s390: Convert vmalloc/memset to vzalloc x86: Convert vmalloc/memset to vzalloc atm: Convert vmalloc/memset to vzalloc drbd: Convert vmalloc/memset to vzalloc char: Convert vmalloc/memset to vzalloc isdn: Convert vmalloc/memset to vzalloc md: Convert vmalloc/memset to vzalloc media: Convert vmalloc/memset to vzalloc mtd: Convert vmalloc/memset to vzalloc scsi: Convert vmalloc/memset to vzalloc staging: Convert vmalloc/memset to vzalloc video: Convert vmalloc/memset to vzalloc fs: Convert vmalloc/memset to vzalloc mm: Convert vmalloc/memset to vzalloc net: Convert vmalloc/memset to vzalloc arch/s390/hypfs/hypfs_diag.c | 3 +-- arch/x86/mm/pageattr-test.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/raw.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/video/videobuf2-dma-sg.c | 8 ++------ drivers/mtd/mtdswap.c | 3 +-- drivers/s390/cio/blacklist.c | 3 +-- drivers/scsi/bfa/bfad.c | 3 +-- drivers/scsi/bfa/bfad_debugfs.c | 8 ++------ drivers/scsi/cxgbi/libcxgbi.h | 6 ++---- drivers/scsi/qla2xxx/qla_attr.c | 6 ++---- drivers/scsi/qla2xxx/qla_bsg.c | 3 +-- drivers/scsi/scsi_debug.c | 7 ++----- drivers/staging/rts_pstor/ms.c | 3 +-- drivers/staging/rts_pstor/rtsx_chip.c | 6 ++---- 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/coda/coda_linux.h | 5 ++--- fs/reiserfs/journal.c | 9 +++------ fs/reiserfs/resize.c | 4 +--- fs/xfs/linux-2.6/kmem.h | 7 +------ mm/page_cgroup.c | 3 +-- net/netfilter/x_tables.c | 5 ++--- net/rds/ib_cm.c | 6 ++---- 36 files changed, 57 insertions(+), 113 deletions(-) -- 1.7.5.rc3.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 internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc Date: Sat, 28 May 2011 10:36:35 -0700 Message-ID: <045996b9688bfaa2efbd8999405a67e23cd0a075.1306603968.git.joe@perches.com> References: Cc: "David S. Miller" , netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, rds-devel@oss.oracle.com To: Patrick McHardy , Andy Grover , Jiri Kosina Return-path: In-Reply-To: Sender: netfilter-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Signed-off-by: Joe Perches --- net/netfilter/x_tables.c | 5 ++--- net/rds/ib_cm.c | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index b0869fe..71441b9 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -776,12 +776,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; diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index fd453dd..6ecaf78 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.5.rc3.dirty From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: [TRIVIAL PATCH next 06/15] isdn: Convert vmalloc/memset to vzalloc Date: Sat, 28 May 2011 10:36:26 -0700 Message-ID: References: Cc: Karsten Keil , netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Jiri Kosina Return-path: Received: from mail.perches.com ([173.55.12.10]:2207 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755262Ab1E1RhF (ORCPT ); Sat, 28 May 2011 13:37:05 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Signed-off-by: Joe Perches --- 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 6ed82ad..6ddb795e 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c @@ -2308,11 +2308,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 2877291..0c41553 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.5.rc3.dirty From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: [TRIVIAL PATCH next 03/15] atm: Convert vmalloc/memset to vzalloc Date: Sat, 28 May 2011 10:36:23 -0700 Message-ID: <116f5bfafcbf40c5bce65498e5ed6983be6c20c1.1306603968.git.joe@perches.com> References: Cc: linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Chas Williams , Jiri Kosina Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Signed-off-by: Joe Perches --- 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 1f8d724..8d7b663 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c @@ -3415,27 +3415,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 4e8ba56..be57a14 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.5.rc3.dirty From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc Date: Thu, 02 Jun 2011 16:49:53 +0200 Message-ID: <4DE7A311.5000406@netfilter.org> References: <045996b9688bfaa2efbd8999405a67e23cd0a075.1306603968.git.joe@perches.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Patrick McHardy , Andy Grover , Jiri Kosina , "David S. Miller" , netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, rds-devel@oss.oracle.com To: Joe Perches Return-path: In-Reply-To: <045996b9688bfaa2efbd8999405a67e23cd0a075.1306603968.git.joe@perches.com> Sender: netfilter-owner@vger.kernel.org List-Id: netdev.vger.kernel.org David, Are you going to take this patch? it includes one chunck which is out of netfilter scope. Thanks. On 28/05/11 19:36, Joe Perches wrote: > Signed-off-by: Joe Perches > --- > net/netfilter/x_tables.c | 5 ++--- > net/rds/ib_cm.c | 6 ++---- > 2 files changed, 4 insertions(+), 7 deletions(-) > > diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c > index b0869fe..71441b9 100644 > --- a/net/netfilter/x_tables.c > +++ b/net/netfilter/x_tables.c > @@ -776,12 +776,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; > diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c > index fd453dd..6ecaf78 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); > From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc Date: Thu, 02 Jun 2011 14:39:27 -0700 (PDT) Message-ID: <20110602.143927.1073346459383432955.davem@davemloft.net> References: <045996b9688bfaa2efbd8999405a67e23cd0a075.1306603968.git.joe@perches.com> <4DE7A311.5000406@netfilter.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: joe@perches.com, kaber@trash.net, andy.grover@oracle.com, trivial@kernel.org, netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, rds-devel@oss.oracle.com To: pablo@netfilter.org Return-path: In-Reply-To: <4DE7A311.5000406@netfilter.org> Sender: netfilter-devel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Pablo Neira Ayuso Date: Thu, 02 Jun 2011 16:49:53 +0200 > Are you going to take this patch? it includes one chunck which is out of > netfilter scope. I think the trivial folks submit these things via their own tree and are only looking for ACKs from us. Acked-by: David S. Miller From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc Date: Thu, 02 Jun 2011 18:35:44 -0700 Message-ID: <1307064945.14598.14.camel@Joe-Laptop> References: <045996b9688bfaa2efbd8999405a67e23cd0a075.1306603968.git.joe@perches.com> <4DE7A311.5000406@netfilter.org> <20110602.143927.1073346459383432955.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: pablo@netfilter.org, kaber@trash.net, andy.grover@oracle.com, trivial@kernel.org, netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, rds-devel@oss.oracle.com To: David Miller Return-path: In-Reply-To: <20110602.143927.1073346459383432955.davem@davemloft.net> Sender: netfilter-devel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thu, 2011-06-02 at 14:39 -0700, David Miller wrote: > From: Pablo Neira Ayuso > Date: Thu, 02 Jun 2011 16:49:53 +0200 > > Are you going to take this patch? it includes one chunk which is out of > > netfilter scope. > I think the trivial folks submit these things via their own tree > and are only looking for ACKs from us. > Acked-by: David S. Miller Getting trivial patches applied between the various maintainers and the trivial tree is most often a bit uncoordinated and haphazard. Doing micropatches for each subsystem maintainer does sometimes appear to be detrimental to getting any treewide modification applied. I've experimented with both micropatches and treewide patches to gauge what happens. I'm not sure either approach is better or worse. In any case, it commonly takes several submittals for these sort of trivial patches to get applied either by the subtree maintainer or by Jiri. Jiri often waits a few weeks for patches to get picked up by any subtree maintainer before looking at his trivial emails. Sometimes he acks what's left, sometimes what's left just disappears into the ethervoid waiting for the submitter to try again. No worries, that's just the way it is. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc Date: Fri, 03 Jun 2011 11:39:16 +0200 Message-ID: <4DE8ABC4.5060404@netfilter.org> References: <045996b9688bfaa2efbd8999405a67e23cd0a075.1306603968.git.joe@perches.com> <4DE7A311.5000406@netfilter.org> <20110602.143927.1073346459383432955.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: joe@perches.com, kaber@trash.net, andy.grover@oracle.com, trivial@kernel.org, netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, rds-devel@oss.oracle.com To: David Miller Return-path: In-Reply-To: <20110602.143927.1073346459383432955.davem@davemloft.net> Sender: netfilter-devel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 02/06/11 23:39, David Miller wrote: > From: Pablo Neira Ayuso > Date: Thu, 02 Jun 2011 16:49:53 +0200 > >> Are you going to take this patch? it includes one chunck which is out of >> netfilter scope. > > I think the trivial folks submit these things via their own tree > and are only looking for ACKs from us. > > Acked-by: David S. Miller Acked-by: Pablo Neira Ayuso