* Re: [PATCH] nvme-pci: mark expected switch fall-through
2019-05-07 14:23 [PATCH] nvme-pci: mark expected switch fall-through Gustavo A. R. Silva
@ 2019-05-07 14:21 ` Keith Busch
2019-05-07 17:41 ` Chaitanya Kulkarni
2019-05-08 7:18 ` Christoph Hellwig
2 siblings, 0 replies; 5+ messages in thread
From: Keith Busch @ 2019-05-07 14:21 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
linux-nvme, linux-kernel, Kees Cook
On Tue, May 07, 2019 at 09:23:00AM -0500, Gustavo A. R. Silva wrote:
> @@ -1296,6 +1296,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
> switch (dev->ctrl.state) {
> case NVME_CTRL_DELETING:
> shutdown = true;
> + /* fall through */
> case NVME_CTRL_CONNECTING:
> case NVME_CTRL_RESETTING:
> dev_warn_ratelimited(dev->ctrl.device,
Thanks, Looks good.
Reviewed-by: Keith Busch <keith.busch@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] nvme-pci: mark expected switch fall-through
@ 2019-05-07 14:23 Gustavo A. R. Silva
2019-05-07 14:21 ` Keith Busch
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-05-07 14:23 UTC (permalink / raw)
To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg
Cc: linux-nvme, linux-kernel, Gustavo A. R. Silva, Kees Cook
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/nvme/host/pci.c: In function ‘nvme_timeout’:
drivers/nvme/host/pci.c:1298:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
shutdown = true;
~~~~~~~~~^~~~~~
drivers/nvme/host/pci.c:1299:2: note: here
case NVME_CTRL_CONNECTING:
^~~~
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/nvme/host/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 3e4fb891a95a..a12f992868c9 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1296,6 +1296,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
switch (dev->ctrl.state) {
case NVME_CTRL_DELETING:
shutdown = true;
+ /* fall through */
case NVME_CTRL_CONNECTING:
case NVME_CTRL_RESETTING:
dev_warn_ratelimited(dev->ctrl.device,
--
2.21.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme-pci: mark expected switch fall-through
2019-05-07 14:23 [PATCH] nvme-pci: mark expected switch fall-through Gustavo A. R. Silva
2019-05-07 14:21 ` Keith Busch
@ 2019-05-07 17:41 ` Chaitanya Kulkarni
2019-05-08 7:18 ` Christoph Hellwig
2 siblings, 0 replies; 5+ messages in thread
From: Chaitanya Kulkarni @ 2019-05-07 17:41 UTC (permalink / raw)
To: Gustavo A. R. Silva, Keith Busch, Jens Axboe, Christoph Hellwig,
Sagi Grimberg
Cc: Kees Cook, linux-kernel, linux-nvme
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
On 5/7/19 7:23 AM, 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 warning:
>
> drivers/nvme/host/pci.c: In function ‘nvme_timeout’:
> drivers/nvme/host/pci.c:1298:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
> shutdown = true;
> ~~~~~~~~~^~~~~~
> drivers/nvme/host/pci.c:1299:2: note: here
> case NVME_CTRL_CONNECTING:
> ^~~~
>
> 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/nvme/host/pci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 3e4fb891a95a..a12f992868c9 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -1296,6 +1296,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
> switch (dev->ctrl.state) {
> case NVME_CTRL_DELETING:
> shutdown = true;
> + /* fall through */
> case NVME_CTRL_CONNECTING:
> case NVME_CTRL_RESETTING:
> dev_warn_ratelimited(dev->ctrl.device,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme-pci: mark expected switch fall-through
2019-05-07 14:23 [PATCH] nvme-pci: mark expected switch fall-through Gustavo A. R. Silva
2019-05-07 14:21 ` Keith Busch
2019-05-07 17:41 ` Chaitanya Kulkarni
@ 2019-05-08 7:18 ` Christoph Hellwig
2019-05-08 14:51 ` Gustavo A. R. Silva
2 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2019-05-08 7:18 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
linux-nvme, linux-kernel, Kees Cook
Thanks,
applied to nvme-5.2.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme-pci: mark expected switch fall-through
2019-05-08 7:18 ` Christoph Hellwig
@ 2019-05-08 14:51 ` Gustavo A. R. Silva
0 siblings, 0 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-05-08 14:51 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Keith Busch, Jens Axboe, Sagi Grimberg, linux-nvme, linux-kernel,
Kees Cook
On 5/8/19 2:18 AM, Christoph Hellwig wrote:
> Thanks,
>
> applied to nvme-5.2.
>
Great. :)
Thanks, Christoph.
--
Gustavo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-05-08 14:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07 14:23 [PATCH] nvme-pci: mark expected switch fall-through Gustavo A. R. Silva
2019-05-07 14:21 ` Keith Busch
2019-05-07 17:41 ` Chaitanya Kulkarni
2019-05-08 7:18 ` Christoph Hellwig
2019-05-08 14:51 ` Gustavo A. R. Silva
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).