diff options
| author | 2026-07-20 19:44:25 +0900 | |
|---|---|---|
| committer | 2026-07-21 17:59:58 +0900 | |
| commit | 0fb6fd1eb3e7c8649473bd0ea6d897c835740157 (patch) | |
| tree | 3621d678f97590bce1580c03138a4d71094940df | |
| parent | tracing/probes: Cleanup pointer arithmetic in store_trace_entry_data() (diff) | |
tracing/probes: Simplify BTF_KIND_PTR case in fetch_type_from_btf_type()
Use a ternary operator for checking IS_ENABLED(CONFIG_64BIT) in the
BTF_KIND_PTR case of fetch_type_from_btf_type() to simplify the code.
Link: https://lore.kernel.org/all/178454426554.296567.17700307233923830044.stgit@devnote2/
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
| -rw-r--r-- | kernel/trace/trace_probe.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index 4899aa5f9230..fc62d09ea535 100644 --- a/kernel/trace/trace_probe.c +++ b/kernel/trace/trace_probe.c @@ -495,10 +495,7 @@ static const char *fetch_type_from_btf_type(struct btf *btf, return "s64"; case BTF_KIND_PTR: /* pointer will be converted to "x??" */ - if (IS_ENABLED(CONFIG_64BIT)) - return "x64"; - else - return "x32"; + return IS_ENABLED(CONFIG_64BIT) ? "x64" : "x32"; case BTF_KIND_INT: intdata = btf_type_int(type); if (BTF_INT_ENCODING(intdata) & BTF_INT_SIGNED) { |
