mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-04 00:03:25 -04:00
livepatch: introduce patch/func-walking helpers
klp_for_each_object and klp_for_each_func are now used all over the code. One need not think what is the proper condition to check in the for loop now. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
cad706df7e
commit
8cdd043ab3
2 changed files with 15 additions and 9 deletions
|
@ -123,6 +123,12 @@ struct klp_patch {
|
|||
enum klp_state state;
|
||||
};
|
||||
|
||||
#define klp_for_each_object(patch, obj) \
|
||||
for (obj = patch->objs; obj->funcs; obj++)
|
||||
|
||||
#define klp_for_each_func(obj, func) \
|
||||
for (func = obj->funcs; func->old_name; func++)
|
||||
|
||||
int klp_register_patch(struct klp_patch *);
|
||||
int klp_unregister_patch(struct klp_patch *);
|
||||
int klp_enable_patch(struct klp_patch *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue