Skip to contentSkip to conversation

xen/9pfs: mark expected switch fall-through in xen_9pfs_front_changed

PATCH New Gustavo A. R. Silva 1 participant 1 message Oct 15, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/9pfs: mark expected switch fall-through in xen_9pfs_front_changed

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.

---
This code was tested by compilation only (GCC 7.2.0 was used).

 net/9p/trans_xen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/9p/trans_xen.c +2 -1
index 6ad3e04..7ec5df9 100644
@@ -510,7 +510,8 @@ static void xen_9pfs_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