Skip to content

Commit

Permalink
kcov: make some symbols static
Browse files Browse the repository at this point in the history
Fix sparse build warnings:

kernel/kcov.c:99:1: warning:
 symbol '__pcpu_scope_kcov_percpu_data' was not declared. Should it be static?
kernel/kcov.c:778:6: warning:
 symbol 'kcov_remote_softirq_start' was not declared. Should it be static?
kernel/kcov.c:795:6: warning:
 symbol 'kcov_remote_softirq_stop' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrey Konovalov <andreyknvl@google.com>
Link: http://lkml.kernel.org/r/20200702115501.73077-1-weiyongjun1@huawei.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Wei Yongjun authored and torvalds committed Aug 12, 2020
1 parent 31a1b98 commit fed79d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/kcov.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ struct kcov_percpu_data {
int saved_sequence;
};

DEFINE_PER_CPU(struct kcov_percpu_data, kcov_percpu_data);
static DEFINE_PER_CPU(struct kcov_percpu_data, kcov_percpu_data);

/* Must be called with kcov_remote_lock locked. */
static struct kcov_remote *kcov_remote_find(u64 handle)
Expand Down Expand Up @@ -775,7 +775,7 @@ static inline bool kcov_mode_enabled(unsigned int mode)
return (mode & ~KCOV_IN_CTXSW) != KCOV_MODE_DISABLED;
}

void kcov_remote_softirq_start(struct task_struct *t)
static void kcov_remote_softirq_start(struct task_struct *t)
{
struct kcov_percpu_data *data = this_cpu_ptr(&kcov_percpu_data);
unsigned int mode;
Expand All @@ -792,7 +792,7 @@ void kcov_remote_softirq_start(struct task_struct *t)
}
}

void kcov_remote_softirq_stop(struct task_struct *t)
static void kcov_remote_softirq_stop(struct task_struct *t)
{
struct kcov_percpu_data *data = this_cpu_ptr(&kcov_percpu_data);

Expand Down

0 comments on commit fed79d0

Please sign in to comment.