mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jiri Kosina <trivial@kernel.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	linux390@de.ibm.com, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [TRIVIAL PATCH next 01/15] s390: Convert vmalloc/memset to vzalloc
Date: Sat, 28 May 2011 10:36:21 -0700	[thread overview]
Message-ID: <f40dc6eefbb2cd401aa47970ffe786c6f198ba47.1306603968.git.joe@perches.com> (raw)
In-Reply-To: <cover.1306603968.git.joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/s390/hypfs/hypfs_diag.c |    3 +--
 drivers/s390/cio/blacklist.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index 6023c6d..74c8f5e 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -562,10 +562,9 @@ static int dbfs_d204_create(void **data, void **data_free_ptr, size_t *size)
 	void *base;
 
 	buf_size = PAGE_SIZE * (diag204_buf_pages + 1) + sizeof(d204->hdr);
-	base = vmalloc(buf_size);
+	base = vzalloc(buf_size);
 	if (!base)
 		return -ENOMEM;
-	memset(base, 0, buf_size);
 	d204 = page_align_ptr(base + sizeof(d204->hdr)) - sizeof(d204->hdr);
 	rc = diag204_do_store(d204->buf, diag204_buf_pages);
 	if (rc) {
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c
index 76058a5..08c6603 100644
--- a/drivers/s390/cio/blacklist.c
+++ b/drivers/s390/cio/blacklist.c
@@ -335,10 +335,9 @@ cio_ignore_write(struct file *file, const char __user *user_buf,
 		return -EINVAL;
 	if (user_len > 65536)
 		user_len = 65536;
-	buf = vmalloc (user_len + 1); /* maybe better use the stack? */
+	buf = vzalloc(user_len + 1); /* maybe better use the stack? */
 	if (buf == NULL)
 		return -ENOMEM;
-	memset(buf, 0, user_len + 1);
 
 	if (strncpy_from_user (buf, user_buf, user_len) < 0) {
 		rc = -EFAULT;
-- 
1.7.5.rc3.dirty


  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 ` Joe Perches [this message]
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 ` [TRIVIAL PATCH next 05/15] char: " Joe Perches
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=f40dc6eefbb2cd401aa47970ffe786c6f198ba47.1306603968.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    --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®