linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf/x86/intel/pt: drop pointless NULL assignment.
@ 2020-04-08 23:52 Paul Gortmaker
  2020-05-01 18:22 ` [tip: perf/core] perf/x86/intel/pt: Drop " tip-bot2 for Paul Gortmaker
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Gortmaker @ 2020-04-08 23:52 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: linux-kernel, x86, Paul Gortmaker

Only a few lines below this removed line is this:

  attrs = kzalloc(size, GFP_KERNEL);

and since there is no code path where this could be avoided, the
NULL assignment is a pointless relic of history and can be removed.

Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
index 1db7a51d9792..e94af4a54d0d 100644
--- a/arch/x86/events/intel/pt.c
+++ b/arch/x86/events/intel/pt.c
@@ -226,8 +226,6 @@ static int __init pt_pmu_hw_init(void)
 			pt_pmu.vmx = true;
 	}
 
-	attrs = NULL;
-
 	for (i = 0; i < PT_CPUID_LEAVES; i++) {
 		cpuid_count(20, i,
 			    &pt_pmu.caps[CPUID_EAX + i*PT_CPUID_REGS_NUM],
-- 
2.17.1


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

* [tip: perf/core] perf/x86/intel/pt: Drop pointless NULL assignment.
  2020-04-08 23:52 [PATCH] perf/x86/intel/pt: drop pointless NULL assignment Paul Gortmaker
@ 2020-05-01 18:22 ` tip-bot2 for Paul Gortmaker
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Paul Gortmaker @ 2020-05-01 18:22 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Paul Gortmaker, Peter Zijlstra (Intel), x86, LKML

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     4bd30106ddb26d2304adc5bb7bd269825300440d
Gitweb:        https://git.kernel.org/tip/4bd30106ddb26d2304adc5bb7bd269825300440d
Author:        Paul Gortmaker <paul.gortmaker@windriver.com>
AuthorDate:    Wed, 08 Apr 2020 19:52:16 -04:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 30 Apr 2020 20:14:36 +02:00

perf/x86/intel/pt: Drop pointless NULL assignment.

Only a few lines below this removed line is this:

  attrs = kzalloc(size, GFP_KERNEL);

and since there is no code path where this could be avoided, the
NULL assignment is a pointless relic of history and can be removed.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200408235216.108980-1-paul.gortmaker@windriver.com
---
 arch/x86/events/intel/pt.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
index 1db7a51..e94af4a 100644
--- a/arch/x86/events/intel/pt.c
+++ b/arch/x86/events/intel/pt.c
@@ -226,8 +226,6 @@ static int __init pt_pmu_hw_init(void)
 			pt_pmu.vmx = true;
 	}
 
-	attrs = NULL;
-
 	for (i = 0; i < PT_CPUID_LEAVES; i++) {
 		cpuid_count(20, i,
 			    &pt_pmu.caps[CPUID_EAX + i*PT_CPUID_REGS_NUM],

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

end of thread, other threads:[~2020-05-01 18:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 23:52 [PATCH] perf/x86/intel/pt: drop pointless NULL assignment Paul Gortmaker
2020-05-01 18:22 ` [tip: perf/core] perf/x86/intel/pt: Drop " tip-bot2 for Paul Gortmaker

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