On Wed, Apr 22, 2026 at 9:04 PM Josh Poimboeuf <[email protected]> wrote:
>
> Convert the callback-based iterate_sym_by_name() and
> iterate_sym_by_demangled_name() callers to use new
> for_each_sym_by[_demangled]_name() macros.  This eliminates the callback
> structs and functions and makes the code more compact and readable.
>
> Signed-off-by: Josh Poimboeuf <[email protected]>
> ---
>  tools/objtool/elf.c                 | 80 ++++++-----------------------
>  tools/objtool/include/objtool/elf.h | 40 ++++++++++++---
>  tools/objtool/klp-checksum.c        | 20 +++-----
>  tools/objtool/klp-diff.c            | 42 +++++----------
>  4 files changed, 73 insertions(+), 109 deletions(-)

Macros are indeed cleaner. But Sashiko has a valid point on this. [1].

Thanks,
Song

[1] 
https://sashiko.dev/#/patchset/cover.1776916871.git.jpoimboe%40kernel.org?part=39

Reply via email to