]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
nvmet-fcloop: suppress a compiler warning
authorBart Van Assche <bvanassche@acm.org>
Wed, 10 Oct 2018 15:08:20 +0000 (08:08 -0700)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:20:49 +0000 (14:20 -0300)
BugLink: https://bugs.launchpad.net/bugs/1854975
[ Upstream commit 1216e9ef18b84f4fb5934792368fb01eb3540520 ]

Building with W=1 enables the compiler warning -Wimplicit-fallthrough=3. That
option does not recognize the fall-through comment in the fcloop driver. Add
a fall-through comment that is recognized for -Wimplicit-fallthrough=3. This
patch avoids that the compiler reports the following warning when building
with W=1:

drivers/nvme/target/fcloop.c:647:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (op == NVMET_FCOP_READDATA)
      ^

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/nvme/target/fcloop.c

index 7fdda8f8a5661c1e17c8e8443c811d2de58fed34..eafadd8848b6ea01827c7fd081afa5fadac27662 100644 (file)
@@ -535,6 +535,7 @@ fcloop_fcp_op(struct nvmet_fc_target_port *tgtport,
                        break;
 
                /* Fall-Thru to RSP handling */
+               /* FALLTHRU */
 
        case NVMET_FCOP_RSP:
                if (fcpreq) {