xen-netfront: mark expected switch fall-through
Subsystems (3)
PATCH 1/1 xen-netfront: mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/xen-netfront.c: In function ‘netback_changed’:drivers/net/xen-netfront.c:2038:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state == XenbusStateClosed)
^
drivers/net/xen-netfront.c:2041:2: note: here
case XenbusStateClosing:
^~~~
Warning level 3 was used: -Wimplicit-fallthrough=3
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
--- drivers/net/xen-netfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netfront.c +1 -1
@@ -2037,7 +2037,7 @@ static void netback_changed(struct xenbus_device *dev,case XenbusStateClosed:if (dev->state == XenbusStateClosed)break ; -/* Missed the backend's CLOSING state -- fallthrough */ +/* Fall through - Missed the backend's CLOSING state. */ case XenbusStateClosing:xenbus_frontend_closed (dev);break ;
Signature · 1 line
2.21.0
Quoted 15 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/xen-netfront.c: In function ‘netback_changed’:drivers/net/xen-netfront.c:2038:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state== XenbusStateClosed)^
drivers/net/xen-netfront.c:2041:2: note: here
case XenbusStateClosing:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
Quoted 7 lines
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Juergen
Quoted 19 lines · Juergen Gross
Quoted 18 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/xen-netfront.c: In function ‘netback_changed’:drivers/net/xen-netfront.c:2038:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state== XenbusStateClosed)^
drivers/net/xen-netfront.c:2041:2: note: here
case XenbusStateClosing:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
Quoted 7 lines
Quoted 4 lines
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>Reviewed-by Juergen Gross <[email protected]>
Thanks, Juergen.
--
Gustavo
Quoted 19 lines · Juergen Gross
Quoted 18 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/xen-netfront.c: In function ‘netback_changed’:drivers/net/xen-netfront.c:2038:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state== XenbusStateClosed)^
drivers/net/xen-netfront.c:2041:2: note: here
case XenbusStateClosing:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
Quoted 7 lines
Quoted 4 lines
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>Reviewed-by Juergen Gross <[email protected]>
Thanks, Juergen.
--
Gustavo
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 15 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/xen-netfront.c: In function ‘netback_changed’:drivers/net/xen-netfront.c:2038:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state== XenbusStateClosed)^
drivers/net/xen-netfront.c:2041:2: note: here
case XenbusStateClosing:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
Quoted 7 lines
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
David Miller
maintainerFrom: "Gustavo A. R. Silva" <[email protected]>
Date: Mon, 15 Apr 2019 16:11:41 -0500
Quoted 15 lines
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/xen-netfront.c: In function ‘netback_changed’:drivers/net/xen-netfront.c:2038:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state== XenbusStateClosed)^
drivers/net/xen-netfront.c:2041:2: note: here
case XenbusStateClosing:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
Quoted 7 lines
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
From: "Gustavo A. R. Silva" <[email protected]>
Date: Mon, 15 Apr 2019 16:11:41 -0500
Quoted 15 lines
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/xen-netfront.c: In function ‘netback_changed’:drivers/net/xen-netfront.c:2038:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state== XenbusStateClosed)^
drivers/net/xen-netfront.c:2041:2: note: here
case XenbusStateClosing:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
Quoted 7 lines
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied.
Boris Ostrovsky
AppliedQuoted 15 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/xen-netfront.c: In function ‘netback_changed’:drivers/net/xen-netfront.c:2038:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state== XenbusStateClosed)^
drivers/net/xen-netfront.c:2041:2: note: here
case XenbusStateClosing:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
Quoted 7 lines
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied to for-linus-5.2
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Boris Ostrovsky
AppliedQuoted 15 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/xen-netfront.c: In function ‘netback_changed’:drivers/net/xen-netfront.c:2038:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state== XenbusStateClosed)^
drivers/net/xen-netfront.c:2041:2: note: here
case XenbusStateClosing:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
Quoted 7 lines
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied to for-linus-5.2
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel