diff options
author | Guenter Roeck <linux@roeck-us.net> | 2021-05-11 01:48:49 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-05-12 11:44:21 +0300 |
commit | 440e906702410f59ae5397ec9e3b639edb53f80e (patch) | |
tree | 4ac4ab43f46568c574c59d4fca636819457d1153 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 88b06399c9c766c283e070b022b5ceafa4f63f19 (diff) | |
download | linux-440e906702410f59ae5397ec9e3b639edb53f80e.tar.xz |
perf/x86/intel/uncore: Drop unnecessary NULL checks after container_of()
The parameter passed to the pmu_enable() and pmu_disable() functions can not be
NULL because it is dereferenced by the caller.
That means the result of container_of() on that parameter can also never be NULL.
The existing NULL checks are therefore unnecessary and misleading. Remove them.
This change was made automatically with the following Coccinelle script.
@@
type t;
identifier v;
statement s;
@@
<+...
(
t v = container_of(...);
|
v = container_of(...);
)
...
when != v
- if (\( !v \| v == NULL \) ) s
...+>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210510224849.2349861-1-linux@roeck-us.net
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions