dyndbg: combine flags & mask into a struct, simplify with it
authorJim Cromie <jim.cromie@gmail.com>
Sun, 19 Jul 2020 23:10:55 +0000 (17:10 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Jul 2020 15:00:09 +0000 (17:00 +0200)
commit84da83a6ffc0b730f64604d869e0697ad106fd42
tree5d2a35bfb104c02d3ed25640f4346ea0b59de1b5
parent14775b04964264189caa4a0862eac05dab8c0502
dyndbg: combine flags & mask into a struct, simplify with it

flags & mask are used together everywhere, and are passed around
together between multiple functions; they belong together in a struct,
call that struct flag_settings.

Use struct flag_settings to rework 3 functions:
 - ddebug_exec_query - declares query and flag-settings,
         calls other 2, passing flags
 - ddebug_parse_flags - fills flag_settings and returns
 - ddebug_change - test all callsites against query,
       modify passing sites.

benefits:
 - bit-banging always needs flags & mask, best together.
 - simpler function signatures
 - 1 less parameter, less stack overhead

no functional changes

Acked-by: <jbaron@akamai.com>
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20200719231058.1586423-16-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/dynamic_debug.c