From: tip-bot for Jesper Juhl <jj@chaosbits.net>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
arjan@infradead.org, jj@chaosbits.net, tglx@linutronix.de,
wli@holomorphy.com, mingo@elte.hu
Subject: [tip:perf/core] profile: Use vzalloc() rather than vmalloc() & memset()
Date: Sun, 31 Oct 2010 15:13:57 GMT [thread overview]
Message-ID: <tip-559fa6e76b271b98ff641fa2a968aa2439e43c28@git.kernel.org> (raw)
In-Reply-To: <alpine.LNX.2.00.1010302150310.1572@swampdragon.chaosbits.net>
Commit-ID: 559fa6e76b271b98ff641fa2a968aa2439e43c28
Gitweb: http://git.kernel.org/tip/559fa6e76b271b98ff641fa2a968aa2439e43c28
Author: Jesper Juhl <jj@chaosbits.net>
AuthorDate: Sat, 30 Oct 2010 21:56:26 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 31 Oct 2010 09:47:26 +0100
profile: Use vzalloc() rather than vmalloc() & memset()
There's no reason to memset() manually when we have vzalloc().
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: William Irwin <wli@holomorphy.com>
LKML-Reference: <alpine.LNX.2.00.1010302150310.1572@swampdragon.chaosbits.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/profile.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/profile.c b/kernel/profile.c
index 66f841b..14c9f87 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -126,11 +126,9 @@ int __ref profile_init(void)
if (prof_buffer)
return 0;
- prof_buffer = vmalloc(buffer_bytes);
- if (prof_buffer) {
- memset(prof_buffer, 0, buffer_bytes);
+ prof_buffer = vzalloc(buffer_bytes);
+ if (prof_buffer)
return 0;
- }
free_cpumask_var(prof_cpu_mask);
return -ENOMEM;
prev parent reply other threads:[~2010-10-31 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-30 19:56 [PATCH] profile: Use vzalloc rather than vmalloc & memset Jesper Juhl
2010-10-31 15:13 ` tip-bot for Jesper Juhl [this message]
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=tip-559fa6e76b271b98ff641fa2a968aa2439e43c28@git.kernel.org \
--to=jj@chaosbits.net \
--cc=arjan@infradead.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=wli@holomorphy.com \
/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
Powered by JetHome