* [PATCH] arch: x86: platform: uv: Replaced kmalloc & memset with kzalloc
@ 2013-03-09 9:40 Alexandru Gheorghiu
2013-03-11 10:02 ` [tip:x86/platform] x86/platform/uv: Replace kmalloc() & memset with kzalloc() tip-bot for Alexandru Gheorghiu
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-09 9:40 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Ingo Molnar, H. Peter Anvin, x86, linux-kernel, Alexandru Gheorghiu
Replaced kmalloc followed by memset calls with a single kzalloc call.
This was found using coccicheck.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
---
arch/x86/platform/uv/uv_time.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/platform/uv/uv_time.c b/arch/x86/platform/uv/uv_time.c
index 98718f6..5c86786 100644
--- a/arch/x86/platform/uv/uv_time.c
+++ b/arch/x86/platform/uv/uv_time.c
@@ -159,10 +159,9 @@ static __init int uv_rtc_allocate_timers(void)
{
int cpu;
- blade_info = kmalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL);
+ blade_info = kzalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL);
if (!blade_info)
return -ENOMEM;
- memset(blade_info, 0, uv_possible_blades * sizeof(void *));
for_each_present_cpu(cpu) {
int nid = cpu_to_node(cpu);
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/platform] x86/platform/uv: Replace kmalloc() & memset with kzalloc()
2013-03-09 9:40 [PATCH] arch: x86: platform: uv: Replaced kmalloc & memset with kzalloc Alexandru Gheorghiu
@ 2013-03-11 10:02 ` tip-bot for Alexandru Gheorghiu
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Alexandru Gheorghiu @ 2013-03-11 10:02 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, gheorghiuandru, tglx
Commit-ID: e87b686b5109e171438a0529828d3109b7ad6da3
Gitweb: http://git.kernel.org/tip/e87b686b5109e171438a0529828d3109b7ad6da3
Author: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
AuthorDate: Sat, 9 Mar 2013 11:40:43 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 11 Mar 2013 08:33:01 +0100
x86/platform/uv: Replace kmalloc() & memset with kzalloc()
This was found using coccicheck.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Link: http://lkml.kernel.org/r/1362822043-15559-1-git-send-email-gheorghiuandru@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/platform/uv/uv_time.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/platform/uv/uv_time.c b/arch/x86/platform/uv/uv_time.c
index 98718f6..5c86786 100644
--- a/arch/x86/platform/uv/uv_time.c
+++ b/arch/x86/platform/uv/uv_time.c
@@ -159,10 +159,9 @@ static __init int uv_rtc_allocate_timers(void)
{
int cpu;
- blade_info = kmalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL);
+ blade_info = kzalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL);
if (!blade_info)
return -ENOMEM;
- memset(blade_info, 0, uv_possible_blades * sizeof(void *));
for_each_present_cpu(cpu) {
int nid = cpu_to_node(cpu);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-11 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-09 9:40 [PATCH] arch: x86: platform: uv: Replaced kmalloc & memset with kzalloc Alexandru Gheorghiu
2013-03-11 10:02 ` [tip:x86/platform] x86/platform/uv: Replace kmalloc() & memset with kzalloc() tip-bot for Alexandru Gheorghiu
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®