diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2024-06-27 09:02:06 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2024-08-07 20:52:52 +0200 |
commit | ea95be4bda694d9000677c04efd15a09cd3ee1d2 (patch) | |
tree | 78395aba303f9a13f41f2c48babd96e61caa3c81 /arch/s390/kernel/perf_cpum_sf.c | |
parent | s390/cpum_sf: Remove unused define PERF_CPUM_SF_MODE_MASK (diff) | |
download | linux-ea95be4bda694d9000677c04efd15a09cd3ee1d2.tar.xz linux-ea95be4bda694d9000677c04efd15a09cd3ee1d2.zip |
s390/cpum_sf: Remove unused defines REG_NONE and REG_OVERFLOW
Member hw_perf_event::reg.reg is set but never used, so remove it.
Defines REG_NONE and REG_OVERFLOW are not referenced anymore.
The initialization to zero takes place in function
perf_event_alloc() where
...
event = kmem_cache_alloc_node(perf_event_cache,
GFP_KERNEL | __GFP_ZERO, node);
...
makes sure memory allocated for the event is zero'ed.
This is done in the kernel's common code in kernel/events/core.c
The struct perf_event contains member hw_perf_event as in
struct perf_event {
....
struct hw_perf_event hw;
....
};
This contained sub-structure is also initialized to zero.
No functional change.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/perf_cpum_sf.c')
-rw-r--r-- | arch/s390/kernel/perf_cpum_sf.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c index 041e22bee839..1019fee3e734 100644 --- a/arch/s390/kernel/perf_cpum_sf.c +++ b/arch/s390/kernel/perf_cpum_sf.c @@ -876,10 +876,6 @@ static int __hw_perf_event_init(struct perf_event *event) if (err) goto out; - /* Initialize sample data overflow accounting */ - hwc->extra_reg.reg = REG_OVERFLOW; - OVERFLOW_REG(hwc) = 0; - /* Use AUX buffer. No need to allocate it by ourself */ if (attr->config == PERF_EVENT_CPUM_SF_DIAG) return 0; |