Message ID | 156521347159.1442374.1381360879102718899.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 5518ba4ebd7d1e15fc558af05fa600198535f074 |
Headers | show |
Series | tools/testing/nvdimm: Fix fallthrough warning | expand |
On Wed, 2019-08-07 at 14:31 -0700, Dan Williams wrote: > Use the expected 'fall through' designation to fix: > > tools/testing/nvdimm/test/nfit.c: In function > ‘nd_intel_test_finish_query’: > tools/testing/nvdimm/test/nfit.c:433:13: warning: this statement > may fall through [-Wimplicit-fallthrough=] > fw->state = FW_STATE_UPDATED; > ~~~~~~~~~~^~~~~~~~~~~~~~~~~~ > tools/testing/nvdimm/test/nfit.c:435:2: note: here > case FW_STATE_UPDATED: > ^~~~ > > Signed-off-by: Dan Williams <dan.j.williams@intel.com> > --- > tools/testing/nvdimm/test/nfit.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Looks good, Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> > > diff --git a/tools/testing/nvdimm/test/nfit.c > b/tools/testing/nvdimm/test/nfit.c > index 507e6f4cbb53..bf6422a6af7f 100644 > --- a/tools/testing/nvdimm/test/nfit.c > +++ b/tools/testing/nvdimm/test/nfit.c > @@ -428,10 +428,9 @@ static int nd_intel_test_finish_query(struct > nfit_test *t, > dev_dbg(dev, "%s: still verifying\n", __func__); > break; > } > - > dev_dbg(dev, "%s: transition out verify\n", __func__); > fw->state = FW_STATE_UPDATED; > - /* we are going to fall through if it's "done" */ > + /* fall through */ > case FW_STATE_UPDATED: > nd_cmd->status = 0; > /* bogus test version */ > > _______________________________________________ > Linux-nvdimm mailing list > Linux-nvdimm@lists.01.org > https://lists.01.org/mailman/listinfo/linux-nvdimm
diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c index 507e6f4cbb53..bf6422a6af7f 100644 --- a/tools/testing/nvdimm/test/nfit.c +++ b/tools/testing/nvdimm/test/nfit.c @@ -428,10 +428,9 @@ static int nd_intel_test_finish_query(struct nfit_test *t, dev_dbg(dev, "%s: still verifying\n", __func__); break; } - dev_dbg(dev, "%s: transition out verify\n", __func__); fw->state = FW_STATE_UPDATED; - /* we are going to fall through if it's "done" */ + /* fall through */ case FW_STATE_UPDATED: nd_cmd->status = 0; /* bogus test version */
Use the expected 'fall through' designation to fix: tools/testing/nvdimm/test/nfit.c: In function ‘nd_intel_test_finish_query’: tools/testing/nvdimm/test/nfit.c:433:13: warning: this statement may fall through [-Wimplicit-fallthrough=] fw->state = FW_STATE_UPDATED; ~~~~~~~~~~^~~~~~~~~~~~~~~~~~ tools/testing/nvdimm/test/nfit.c:435:2: note: here case FW_STATE_UPDATED: ^~~~ Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- tools/testing/nvdimm/test/nfit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)