From ac2223076106ddf954c71586bbfba101764d3b8b Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Wed, 30 Apr 2014 13:26:29 -0500 Subject: [PATCH] kmod/core: make func->op an enum --- kmod/core/core.c | 7 ------- kmod/core/kpatch.h | 8 +++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/kmod/core/core.c b/kmod/core/core.c index 7fe8f54..1bfe029 100644 --- a/kmod/core/core.c +++ b/kmod/core/core.c @@ -100,13 +100,6 @@ enum { }; static atomic_t kpatch_state; -/* values for func->op */ -enum { - KPATCH_OP_NONE, - KPATCH_OP_PATCH, - KPATCH_OP_UNPATCH, -}; - static inline void kpatch_state_idle(void) { diff --git a/kmod/core/kpatch.h b/kmod/core/kpatch.h index 5affdb7..c5dc8b6 100644 --- a/kmod/core/kpatch.h +++ b/kmod/core/kpatch.h @@ -28,6 +28,12 @@ #include #include +enum kpatch_op { + KPATCH_OP_NONE, + KPATCH_OP_PATCH, + KPATCH_OP_UNPATCH, +}; + struct kpatch_func { /* public */ unsigned long new_addr; @@ -37,7 +43,7 @@ struct kpatch_func { /* private */ struct hlist_node node; - int op; + enum kpatch_op op; }; struct kpatch_module {