smatch,sparse: trivial code cleanups

Fixes smatch warning:
  kmod/core/core.c:64:1: warning: symbol 'kpmod_list' was not declared.  Should it be static?

Fixes sparse warnings:
  kmod/core/core.c:680 kpatch_write_relocations() warn: inconsistent indenting
  kmod/core/core.c:750 kpatch_write_relocations() warn: inconsistent indenting
This commit is contained in:
Joe Lawrence 2016-12-13 16:53:52 -05:00
parent 5a6ddaad8d
commit 501a63ad6d
1 changed files with 5 additions and 5 deletions

View File

@ -66,7 +66,7 @@ static DEFINE_HASHTABLE(kpatch_func_hash, KPATCH_HASH_BITS);
static DEFINE_SEMAPHORE(kpatch_mutex); static DEFINE_SEMAPHORE(kpatch_mutex);
LIST_HEAD(kpmod_list); static LIST_HEAD(kpmod_list);
static int kpatch_num_patched; static int kpatch_num_patched;
@ -641,11 +641,11 @@ static int kpatch_write_relocations(struct kpatch_module *kpmod,
( LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) && \ ( LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) && \
UTS_UBUNTU_RELEASE_ABI >= 7 ) \ UTS_UBUNTU_RELEASE_ABI >= 7 ) \
) )
unsigned long core = (unsigned long)kpmod->mod->core_layout.base; unsigned long core = (unsigned long)kpmod->mod->core_layout.base;
unsigned long core_size = kpmod->mod->core_layout.size; unsigned long core_size = kpmod->mod->core_layout.size;
#else #else
unsigned long core = (unsigned long)kpmod->mod->module_core; unsigned long core = (unsigned long)kpmod->mod->module_core;
unsigned long core_size = kpmod->mod->core_size; unsigned long core_size = kpmod->mod->core_size;
#endif #endif
list_for_each_entry(dynrela, &object->dynrelas, list) { list_for_each_entry(dynrela, &object->dynrelas, list) {