mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Colin King <colin.king@canonical.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	David Daney <david.daney@cavium.com>,
	"David S . Miller" <davem@davemloft.net>,
	Daniel Borkmann <daniel@iogearbox.net>,
	linux-mips@linux-mips.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] MIPS,bpf: fix missing break in switch statement
Date: Tue, 22 Aug 2017 15:29:15 -0700	[thread overview]
Message-ID: <93479b06-c3a2-a08a-fe5c-d8f155efeacc@caviumnetworks.com> (raw)
In-Reply-To: <20170822220349.5648-1-colin.king@canonical.com>

On 08/22/2017 03:03 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> 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 <colin.king@canonical.com>

Crap!  That slipped through.  Thanks for fixing it.

Tested and ...

Acked-by: David Daney <david.daney@cavium.com>

> ---
>   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;
>   	}
> 

  reply	other threads:[~2017-08-22 22:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 22:03 Colin King
2017-08-22 22:29 ` David Daney [this message]
2017-08-22 22:33   ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93479b06-c3a2-a08a-fe5c-d8f155efeacc@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=colin.king@canonical.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=david.daney@cavium.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®