nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: nvdimm@lists.linux.dev,  vishal.l.verma@intel.com
Subject: Re: [PATCH] tools/testing/nvdimm: Fix missing 'fallthrough' warning
Date: Wed, 04 Aug 2021 13:13:28 -0400	[thread overview]
Message-ID: <x49h7g5t9on.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <162767522046.3313209.14767278726893995797.stgit@dwillia2-desk3.amr.corp.intel.com> (Dan Williams's message of "Fri, 30 Jul 2021 13:00:20 -0700")

Dan Williams <dan.j.williams@intel.com> writes:

> Use "fallthrough;" to address:
>
> tools/testing/nvdimm/test/nfit.c: In function ‘nd_intel_test_finish_query’:
> tools/testing/nvdimm/test/nfit.c:436:37: warning: this statement may
> 	fall through [-Wimplicit-fallthrough=]
>   436 |                 fw->missed_activate = false;
>       |                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~
> tools/testing/nvdimm/test/nfit.c:438:9: note: here
>   438 |         case FW_STATE_UPDATED:
>       |         ^~~~
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  tools/testing/nvdimm/test/nfit.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
> index 54f367cbadae..b1bff5fb0f65 100644
> --- a/tools/testing/nvdimm/test/nfit.c
> +++ b/tools/testing/nvdimm/test/nfit.c
> @@ -434,7 +434,7 @@ static int nd_intel_test_finish_query(struct nfit_test *t,
>  		dev_dbg(dev, "%s: transition out verify\n", __func__);
>  		fw->state = FW_STATE_UPDATED;
>  		fw->missed_activate = false;
> -		/* fall through */
> +		fallthrough;
>  	case FW_STATE_UPDATED:
>  		nd_cmd->status = 0;
>  		/* bogus test version */

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>


      reply	other threads:[~2021-08-04 17:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 20:00 Dan Williams
2021-08-04 17:13 ` Jeff Moyer [this message]

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=x49h7g5t9on.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=vishal.l.verma@intel.com \
    --subject='Re: [PATCH] tools/testing/nvdimm: Fix missing '\''fallthrough'\'' warning' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).