[PATCH] sched: fix defined-but-unused warning - Kernel

This is a discussion on [PATCH] sched: fix defined-but-unused warning - Kernel ; Fix this warning, which appears with !CONFIG_SMP: kernel/sched.c:1216: warning: `init_hrtick' defined but not used Signed-off-by: Rabin Vincent --- kernel/sched.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/sched.c b/kernel/sched.c index 58fb8af..5aa8c5d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH] sched: fix defined-but-unused warning

  1. [PATCH] sched: fix defined-but-unused warning

    Fix this warning, which appears with !CONFIG_SMP:
    kernel/sched.c:1216: warning: `init_hrtick' defined but not used

    Signed-off-by: Rabin Vincent
    ---
    kernel/sched.c | 2 ++
    1 files changed, 2 insertions(+), 0 deletions(-)

    diff --git a/kernel/sched.c b/kernel/sched.c
    index 58fb8af..5aa8c5d 100644
    --- a/kernel/sched.c
    +++ b/kernel/sched.c
    @@ -1161,6 +1161,7 @@ static enum hrtimer_restart hrtick(struct hrtimer *timer)
    return HRTIMER_NORESTART;
    }

    +#ifdef CONFIG_SMP
    static void hotplug_hrtick_disable(int cpu)
    {
    struct rq *rq = cpu_rq(cpu);
    @@ -1216,6 +1217,7 @@ static void init_hrtick(void)
    {
    hotcpu_notifier(hotplug_hrtick, 0);
    }
    +#endif /* CONFIG_SMP */

    static void init_rq_hrtick(struct rq *rq)
    {
    --
    1.5.5.1

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH] sched: fix defined-but-unused warning


    * Rabin Vincent wrote:

    > Fix this warning, which appears with !CONFIG_SMP: kernel/sched.c:1216:
    > warning: `init_hrtick' defined but not used


    applied, thanks Rabin.

    Ingo
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread