mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
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>
This commit is contained in:
parent
78d252c935
commit
0fb6fd1eb3
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user