Skip to content

Commit

Permalink
Fixes as sparse suggested
Browse files Browse the repository at this point in the history
Signed-off-by: Akira Moroo <retrage01@gmail.com>
  • Loading branch information
retrage committed Sep 19, 2019
1 parent aaadb1b commit 5b8394a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arch/um/lkl/kernel/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static struct console lkl_console = {
.index = -1,
};

int __init lkl_console_init(void)
static int __init lkl_console_init(void)
{
register_console(&lkl_console);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/um/lkl/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* mutex or semaphore. Instead, we use a mutex and a bunch of status data plus a
* semaphore.
*/
struct lkl_cpu {
static struct lkl_cpu {
/* lock that protects the CPU status data */
struct lkl_mutex *lock;
/*
Expand Down
4 changes: 2 additions & 2 deletions arch/um/lkl/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static int is_running;
void (*pm_power_off)(void) = NULL;
static unsigned long mem_size = 64 * 1024 * 1024;

long lkl_panic_blink(int state)
static long lkl_panic_blink(int state)
{
lkl_ops->panic();
return 0;
Expand Down Expand Up @@ -166,7 +166,7 @@ static int lkl_run_init(struct linux_binprm *bprm)

set_binfmt(&lkl_run_init_binfmt);

init_pid_ns.child_reaper = 0;
init_pid_ns.child_reaper = NULL;

syscalls_init();

Expand Down
2 changes: 1 addition & 1 deletion arch/um/lkl/kernel/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ typedef long (*syscall_handler_t)(long arg1, ...);
#undef __SYSCALL
#define __SYSCALL(nr, sym) [nr] = (syscall_handler_t)sym,

syscall_handler_t syscall_table[__NR_syscalls] = {
static syscall_handler_t syscall_table[__NR_syscalls] = {
[0 ... __NR_syscalls - 1] = (syscall_handler_t)sys_ni_syscall,
#include <asm/unistd.h>

Expand Down

0 comments on commit 5b8394a

Please sign in to comment.