Skip to contentSkip to conversation

xen/pvcalls-front: mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 3 participants 4 messages Nov 2, 2017 – Nov 8, 2017 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/pvcalls-front: mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Notice that in this particular case I placed the "fall through" comment on its own line, which is what GCC is expecting to find.

---
 drivers/xen/pvcalls-front.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/xen/pvcalls-front.c +2 -1
index 0c1ec68..ed94ea0 100644
@@ -1250,7 +1250,8 @@ static void pvcalls_front_changed(struct xenbus_device *dev,
 	case XenbusStateClosed:
 		if (dev->state == XenbusStateClosed)
 			break;
-		/* Missed the backend's CLOSING state -- fallthrough */
+		/* Missed the backend's CLOSING state */
+		/* fall through */
 	case XenbusStateClosing:
 		xenbus_frontend_closed(dev);
 		break;
Signature · 1 line
2.7.4
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Notice that in this particular case I placed the "fall through" comment on its own line, which is what GCC is expecting to find.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 9 lines · Juergen Gross
Quoted 7 lines · Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Notice that in this particular case I placed the "fall through" comment on its own line, which is what GCC is expecting to find.

Applied to for-linus-4.15.

-boris

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel