mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: David Airlie <airlied@linux.ie>, Jiri Kosina <trivial@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [TRIVIAL PATCH next 05/15] char: Convert vmalloc/memset to vzalloc
Date: Sat, 28 May 2011 10:36:25 -0700	[thread overview]
Message-ID: <31b0632dcc5917cda767ad9ffafaa8bc9a95ee02.1306603968.git.joe@perches.com> (raw)
In-Reply-To: <cover.1306603968.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/char/agp/backend.c |    3 +--
 drivers/char/raw.c         |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index f27d0d0..4b71647 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -171,7 +171,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
 	}
 	got_gatt = 1;
 
-	bridge->key_list = vmalloc(PAGE_SIZE * 4);
+	bridge->key_list = vzalloc(PAGE_SIZE * 4);
 	if (bridge->key_list == NULL) {
 		dev_err(&bridge->dev->dev,
 			"can't allocate memory for key lists\n");
@@ -181,7 +181,6 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
 	got_keylist = 1;
 
 	/* FIXME vmalloc'd memory not guaranteed contiguous */
-	memset(bridge->key_list, 0, PAGE_SIZE * 4);
 
 	if (bridge->driver->configure()) {
 		dev_err(&bridge->dev->dev, "error configuring host chipset\n");
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index b33e8ea..b6de2c0 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -324,13 +324,12 @@ static int __init raw_init(void)
 		max_raw_minors = MAX_RAW_MINORS;
 	}
 
-	raw_devices = vmalloc(sizeof(struct raw_device_data) * max_raw_minors);
+	raw_devices = vzalloc(sizeof(struct raw_device_data) * max_raw_minors);
 	if (!raw_devices) {
 		printk(KERN_ERR "Not enough memory for raw device structures\n");
 		ret = -ENOMEM;
 		goto error;
 	}
-	memset(raw_devices, 0, sizeof(struct raw_device_data) * max_raw_minors);
 
 	ret = register_chrdev_region(dev, max_raw_minors, "raw");
 	if (ret)
-- 
1.7.5.rc3.dirty


  parent reply	other threads:[~2011-05-28 17:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28 17:36 [TRIVIAL PATCH next 00/15] treewide: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 01/15] s390: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 02/15] x86: " Joe Perches
2011-05-29 19:25   ` [tip:x86/cleanups] x86: Convert vmalloc()+memset() to vzalloc() tip-bot for Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 03/15] atm: Convert vmalloc/memset to vzalloc Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 04/15] drbd: " Joe Perches
2011-05-28 17:36 ` Joe Perches [this message]
2011-05-28 17:36 ` [TRIVIAL PATCH next 06/15] isdn: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 07/15] md: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 08/15] media: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 09/15] mtd: " Joe Perches
2011-06-01  8:20   ` Artem Bityutskiy
2011-05-28 17:36 ` [TRIVIAL PATCH next 10/15] scsi: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 11/15] staging: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 12/15] video: " Joe Perches
2011-05-28 17:48   ` Heiko Stübner
2011-05-28 18:13     ` [TRIVIAL PATCH V2 " Joe Perches
2011-05-31 14:28       ` Konrad Rzeszutek Wilk
2011-06-02  8:26       ` Paul Mundt
2011-05-30 11:40   ` [TRIVIAL PATCH " Mel Gorman
2011-05-28 17:36 ` [TRIVIAL PATCH next 13/15] fs: " Joe Perches
2011-05-31 18:20   ` Alex Elder
2011-05-28 17:36 ` [TRIVIAL PATCH next 14/15] mm: " Joe Perches
2011-05-31 19:47   ` Paul Menage
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31b0632dcc5917cda767ad9ffafaa8bc9a95ee02.1306603968.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=airlied@linux.ie \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®