lkml.org 
[lkml]   [2019]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 125/305] um: Give start_idle_thread() a return code
    3.16.63-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Richard Weinberger <richard@nod.at>

    commit 7ff1e34bbdc15acab823b1ee4240e94623d50ee8 upstream.

    Fixes:
    arch/um/os-Linux/skas/process.c:613:1: warning: control reaches end of
    non-void function [-Wreturn-type]

    longjmp() never returns but gcc still warns that the end of the function
    can be reached.
    Add a return code and debug aid to detect this impossible case.

    Signed-off-by: Richard Weinberger <richard@nod.at>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    arch/um/os-Linux/skas/process.c | 5 +++++
    1 file changed, 5 insertions(+)

    --- a/arch/um/os-Linux/skas/process.c
    +++ b/arch/um/os-Linux/skas/process.c
    @@ -694,6 +694,11 @@ int start_idle_thread(void *stack, jmp_b
    fatal_sigsegv();
    }
    longjmp(*switch_buf, 1);
    +
    + /* unreachable */
    + printk(UM_KERN_ERR "impossible long jump!");
    + fatal_sigsegv();
    + return 0;
    }

    void initial_thread_cb_skas(void (*proc)(void *), void *arg)
    \
     
     \ /
      Last update: 2019-02-03 15:26    [W:4.033 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site