Skip to contentSkip to conversation

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

PATCH Applied Paul Gortmaker 2 participants 2 messages Apr 8, 2020 – May 1, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

arch/x86/events/intel/pt.c +0 -2
index 1db7a51d9792..e94af4a54d0d 100644
@@ -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],
Signature · 1 line
2.17.1
merge bot Applied
#1 lore raw

[tip: perf/core] perf/x86/intel/pt: Drop pointless NULL assignment.

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

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 <[email protected]>
AuthorDate:    Wed, 08 Apr 2020 19:52:16 -04:00
Committer:     Peter Zijlstra <[email protected]>
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.

---
 arch/x86/events/intel/pt.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/events/intel/pt.c +0 -2
index 1db7a51..e94af4a 100644
@@ -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],