lkml.org 
[lkml]   [2019]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] x86/ptrace: Mark expected switch fall-through
    Mark switch cases where we are expecting to fall through.

    Fix the following warning (Building: allnoconfig i386):

    arch/x86/kernel/ptrace.c:202:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if (unlikely(value == 0))
    ^
    arch/x86/kernel/ptrace.c:206:2: note: here
    default:
    ^~~~~~~

    Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
    ---
    arch/x86/kernel/ptrace.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
    index 0fdbe89d0754..3c5bbe8e4120 100644
    --- a/arch/x86/kernel/ptrace.c
    +++ b/arch/x86/kernel/ptrace.c
    @@ -201,6 +201,7 @@ static int set_segment_reg(struct task_struct *task,
    case offsetof(struct user_regs_struct, ss):
    if (unlikely(value == 0))
    return -EIO;
    + /* Else, fall through */

    default:
    *pt_regs_access(task_pt_regs(task), offset) = value;
    --
    2.22.0
    \
     
     \ /
      Last update: 2019-08-05 21:57    [W:5.998 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site