kmod/core: checkpatch style fixes

This commit is contained in:
Josh Poimboeuf 2014-07-14 15:49:59 -05:00
parent a12715c2e2
commit 96d3d241f5
1 changed files with 28 additions and 26 deletions

View File

@ -132,6 +132,7 @@ static atomic_t kpatch_state;
static inline void kpatch_state_idle(void) static inline void kpatch_state_idle(void)
{ {
int state = atomic_read(&kpatch_state); int state = atomic_read(&kpatch_state);
WARN_ON(state != KPATCH_STATE_SUCCESS && state != KPATCH_STATE_FAILURE); WARN_ON(state != KPATCH_STATE_SUCCESS && state != KPATCH_STATE_FAILURE);
atomic_set(&kpatch_state, KPATCH_STATE_IDLE); atomic_set(&kpatch_state, KPATCH_STATE_IDLE);
} }
@ -146,6 +147,7 @@ static inline void kpatch_state_updating(void)
static inline int kpatch_state_finish(int state) static inline int kpatch_state_finish(int state)
{ {
int result; int result;
WARN_ON(state != KPATCH_STATE_SUCCESS && state != KPATCH_STATE_FAILURE); WARN_ON(state != KPATCH_STATE_SUCCESS && state != KPATCH_STATE_FAILURE);
result = atomic_cmpxchg(&kpatch_state, KPATCH_STATE_UPDATING, state); result = atomic_cmpxchg(&kpatch_state, KPATCH_STATE_UPDATING, state);
return result == KPATCH_STATE_UPDATING ? state : result; return result == KPATCH_STATE_UPDATING ? state : result;
@ -608,8 +610,8 @@ static int kpatch_write_relocations(struct kpatch_module *kpmod,
break; break;
default: default:
pr_err("unsupported rela type %ld for source %s (0x%lx <- 0x%lx)\n", pr_err("unsupported rela type %ld for source %s (0x%lx <- 0x%lx)\n",
dynrela->type, dynrela->name, dynrela->type, dynrela->name, dynrela->dest,
dynrela->dest, dynrela->src); dynrela->src);
return -EINVAL; return -EINVAL;
} }