Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752622AbdHVWD6 (ORCPT ); Tue, 22 Aug 2017 18:03:58 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:33714 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751651AbdHVWD5 (ORCPT ); Tue, 22 Aug 2017 18:03:57 -0400 From: Colin King To: Ralf Baechle , David Daney , "David S . Miller" , Daniel Borkmann , linux-mips@linux-mips.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] MIPS,bpf: fix missing break in switch statement Date: Tue, 22 Aug 2017 23:03:49 +0100 Message-Id: <20170822220349.5648-1-colin.king@canonical.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 922 Lines: 30 From: Colin Ian King There is a missing break causing a fall-through and setting ctx.use_bbit_insns to the wrong value. Fix this by adding the missing break. Detected with cppcheck: "Variable 'ctx.use_bbit_insns' is reassigned a value before the old one has been used. 'break;' missing?" Fixes: 8d8d18c3283f ("MIPS,bpf: Fix using smp_processor_id() in preemptible splat.") Signed-off-by: Colin Ian King --- arch/mips/net/ebpf_jit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c index 44ddc12cbb0e..7646891c4e9b 100644 --- a/arch/mips/net/ebpf_jit.c +++ b/arch/mips/net/ebpf_jit.c @@ -1892,6 +1892,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) case CPU_CAVIUM_OCTEON2: case CPU_CAVIUM_OCTEON3: ctx.use_bbit_insns = 1; + break; default: ctx.use_bbit_insns = 0; } -- 2.14.1