mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] intel_th: Mark expected switch fall-throughs
Date: Wed, 20 Feb 2019 12:12:43 -0600	[thread overview]
Message-ID: <6da79f27-68ec-6f94-92e3-4b66a822731f@embeddedor.com> (raw)
In-Reply-To: <20190212214302.GA23708@embeddedor>

Hi all,

Friendly ping:

Who can take this?

Thanks
--
Gustavo

On 2/12/19 3:43 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
> 
> This patch fixes the following warnings:
> 
> drivers/hwtracing/intel_th/sth.c: In function ‘sth_stm_packet’:
> drivers/hwtracing/intel_th/sth.c:86:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    reg += 4;
>    ~~~~^~~~
> drivers/hwtracing/intel_th/sth.c:87:2: note: here
>   case STP_PACKET_XSYNC:
>   ^~~~
> drivers/hwtracing/intel_th/sth.c:88:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    reg += 8;
>    ~~~~^~~~
> drivers/hwtracing/intel_th/sth.c:89:2: note: here
>   case STP_PACKET_TRIG:
>   ^~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/hwtracing/intel_th/sth.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/hwtracing/intel_th/sth.c b/drivers/hwtracing/intel_th/sth.c
> index 4b7ae47789d2..3a1f4e650378 100644
> --- a/drivers/hwtracing/intel_th/sth.c
> +++ b/drivers/hwtracing/intel_th/sth.c
> @@ -84,8 +84,12 @@ static ssize_t notrace sth_stm_packet(struct stm_data *stm_data,
>  	/* Global packets (GERR, XSYNC, TRIG) are sent with register writes */
>  	case STP_PACKET_GERR:
>  		reg += 4;
> +		/* fall through */
> +
>  	case STP_PACKET_XSYNC:
>  		reg += 8;
> +		/* fall through */
> +
>  	case STP_PACKET_TRIG:
>  		if (flags & STP_PACKET_TIMESTAMPED)
>  			reg += 4;
> 

  reply	other threads:[~2019-02-20 18:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 21:43 Gustavo A. R. Silva
2019-02-20 18:12 ` Gustavo A. R. Silva [this message]
2019-02-21 11:52   ` Alexander Shishkin

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=6da79f27-68ec-6f94-92e3-4b66a822731f@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.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®