mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
livepatch: Introduce klp_for_each_patch macro
There are already macros to iterate over struct klp_func and klp_object. Add also klp_for_each_patch(). But make it internal because also klp_patches list is internal. Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com> Acked-by: Miroslav Benes <mbenes@suse.cz> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
parent
375bfca345
commit
ecba29f434
3 changed files with 11 additions and 5 deletions
|
@ -7,6 +7,12 @@
|
|||
extern struct mutex klp_mutex;
|
||||
extern struct list_head klp_patches;
|
||||
|
||||
#define klp_for_each_patch_safe(patch, tmp_patch) \
|
||||
list_for_each_entry_safe(patch, tmp_patch, &klp_patches, list)
|
||||
|
||||
#define klp_for_each_patch(patch) \
|
||||
list_for_each_entry(patch, &klp_patches, list)
|
||||
|
||||
void klp_free_patch_start(struct klp_patch *patch);
|
||||
void klp_discard_replaced_patches(struct klp_patch *new_patch);
|
||||
void klp_discard_nops(struct klp_patch *new_patch);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue