netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc
@ 2011-05-28 17:36 Joe Perches
  2011-05-28 17:36 ` [TRIVIAL PATCH next 03/15] atm: " Joe Perches
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Joe Perches @ 2011-05-28 17:36 UTC (permalink / raw)
  To: linux-atm-general, netdev, drbd-user, dm-devel, linux-raid,
	linux-mtd, linux-s
  Cc: linux-s390, linux-kernel, linux-media, devel, xfs

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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [TRIVIAL PATCH next 03/15] atm: Convert vmalloc/memset to vzalloc
  2011-05-28 17:36 [TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc Joe Perches
@ 2011-05-28 17:36 ` Joe Perches
  2011-05-28 17:36 ` [TRIVIAL PATCH next 06/15] isdn: " Joe Perches
  2011-05-28 17:36 ` [TRIVIAL PATCH next 15/15] net: " Joe Perches
  2 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2011-05-28 17:36 UTC (permalink / raw)
  To: Chas Williams, Jiri Kosina; +Cc: 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 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

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

* [TRIVIAL PATCH next 06/15] isdn: Convert vmalloc/memset to vzalloc
  2011-05-28 17:36 [TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc Joe Perches
  2011-05-28 17:36 ` [TRIVIAL PATCH next 03/15] atm: " Joe Perches
@ 2011-05-28 17:36 ` Joe Perches
  2011-05-28 17:36 ` [TRIVIAL PATCH next 15/15] net: " Joe Perches
  2 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2011-05-28 17:36 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 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


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

* [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc
  2011-05-28 17:36 [TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc Joe Perches
  2011-05-28 17:36 ` [TRIVIAL PATCH next 03/15] atm: " Joe Perches
  2011-05-28 17:36 ` [TRIVIAL PATCH next 06/15] isdn: " Joe Perches
@ 2011-05-28 17:36 ` Joe Perches
  2011-06-02 14:49   ` Pablo Neira Ayuso
  2 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2011-05-28 17:36 UTC (permalink / raw)
  To: Patrick McHardy, Andy Grover, Jiri Kosina
  Cc: David S. Miller, netfilter-devel, netfilter, coreteam, netdev,
	linux-kernel, rds-devel

Signed-off-by: Joe Perches <joe@perches.com>
---
 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


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

* Re: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc
  2011-05-28 17:36 ` [TRIVIAL PATCH next 15/15] net: " Joe Perches
@ 2011-06-02 14:49   ` Pablo Neira Ayuso
  2011-06-02 21:39     ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Pablo Neira Ayuso @ 2011-06-02 14:49 UTC (permalink / raw)
  To: Joe Perches
  Cc: Patrick McHardy, Andy Grover, Jiri Kosina, David S. Miller,
	netfilter-devel, netfilter, coreteam, netdev, linux-kernel,
	rds-devel

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 <joe@perches.com>
> ---
>  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);
>  


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

* Re: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc
  2011-06-02 14:49   ` Pablo Neira Ayuso
@ 2011-06-02 21:39     ` David Miller
  2011-06-03  1:35       ` Joe Perches
  2011-06-03  9:39       ` Pablo Neira Ayuso
  0 siblings, 2 replies; 8+ messages in thread
From: David Miller @ 2011-06-02 21:39 UTC (permalink / raw)
  To: pablo
  Cc: joe, kaber, andy.grover, trivial, netfilter-devel, netfilter,
	coreteam, netdev, linux-kernel, rds-devel

From: Pablo Neira Ayuso <pablo@netfilter.org>
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 <davem@davemloft.net>

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

* Re: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc
  2011-06-02 21:39     ` David Miller
@ 2011-06-03  1:35       ` Joe Perches
  2011-06-03  9:39       ` Pablo Neira Ayuso
  1 sibling, 0 replies; 8+ messages in thread
From: Joe Perches @ 2011-06-03  1:35 UTC (permalink / raw)
  To: David Miller
  Cc: pablo, kaber, andy.grover, trivial, netfilter-devel, netfilter,
	coreteam, netdev, linux-kernel, rds-devel

On Thu, 2011-06-02 at 14:39 -0700, David Miller wrote:
> From: Pablo Neira Ayuso <pablo@netfilter.org>
> 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 <davem@davemloft.net>

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.



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

* Re: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc
  2011-06-02 21:39     ` David Miller
  2011-06-03  1:35       ` Joe Perches
@ 2011-06-03  9:39       ` Pablo Neira Ayuso
  1 sibling, 0 replies; 8+ messages in thread
From: Pablo Neira Ayuso @ 2011-06-03  9:39 UTC (permalink / raw)
  To: David Miller
  Cc: joe, kaber, andy.grover, trivial, netfilter-devel, netfilter,
	coreteam, netdev, linux-kernel, rds-devel

On 02/06/11 23:39, David Miller wrote:
> From: Pablo Neira Ayuso <pablo@netfilter.org>
> 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 <davem@davemloft.net>

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

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

end of thread, other threads:[~2011-06-03  9:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-28 17:36 [TRIVIAL PATCH next 00/15] treewide: Convert vmalloc/memset to vzalloc Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 03/15] atm: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 06/15] isdn: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 15/15] net: " Joe Perches
2011-06-02 14:49   ` Pablo Neira Ayuso
2011-06-02 21:39     ` David Miller
2011-06-03  1:35       ` Joe Perches
2011-06-03  9:39       ` Pablo Neira Ayuso

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).