Skip to contentSkip to conversation

xen, fbfront: mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 3 participants 9 messages Feb 27, 2019 – Apr 1, 2019 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen, fbfront: 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/video/fbdev/xen-fbfront.c: In function ‘xenfb_backend_changed’:
drivers/video/fbdev/xen-fbfront.c:678:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (dev->state == XenbusStateClosed)

      ^

drivers/video/fbdev/xen-fbfront.c:681: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/video/fbdev/xen-fbfront.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/xen-fbfront.c +1 -1
index 6a4bbc9e1fb0..a3d6b6db221b 100644
@@ -677,7 +677,7 @@ static void xenfb_backend_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
#1 lore raw

+Xen-devel list

Quoted 39 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/video/fbdev/xen-fbfront.c: In function ‘xenfb_backend_changed’:
drivers/video/fbdev/xen-fbfront.c:678:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

    if (dev->state == XenbusStateClosed)
       ^
drivers/video/fbdev/xen-fbfront.c:681: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/video/fbdev/xen-fbfront.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/xen-fbfront.c +1 -1
index 6a4bbc9e1fb0..a3d6b6db221b 100644
@@ -677,7 +677,7 @@ static void xenfb_backend_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;
#2 lore raw

Hi all,

Friendly ping:

Who can take this?

Thanks
--
Gustavo

Quoted 43 lines · Oleksandr Andrushchenko

+Xen-devel list

Quoted 39 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/video/fbdev/xen-fbfront.c: In function ‘xenfb_backend_changed’:
drivers/video/fbdev/xen-fbfront.c:678:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dev->state = XenbusStateClosed)
       ^
drivers/video/fbdev/xen-fbfront.c:681: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/video/fbdev/xen-fbfront.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/xen-fbfront.c +0 -0
index 6a4bbc9e1fb0..a3d6b6db221b 100644
@@ -677,7 +677,7 @@ static void xenfb_backend_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;

#3 lore raw

Hi,

Quoted 5 lines · Gustavo A. R. Silva

Hi all,

Friendly ping:

Who can take this?

I'll take this for v5.2.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Quoted 47 lines

Thanks
--
Gustavo

Quoted 42 lines · Oleksandr Andrushchenko

+Xen-devel list

Quoted 39 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/video/fbdev/xen-fbfront.c: In function ‘xenfb_backend_changed’:
drivers/video/fbdev/xen-fbfront.c:678:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

    if (dev->state == XenbusStateClosed)
       ^
drivers/video/fbdev/xen-fbfront.c:681: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/video/fbdev/xen-fbfront.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/xen-fbfront.c +1 -1
index 6a4bbc9e1fb0..a3d6b6db221b 100644
@@ -677,7 +677,7 @@ static void xenfb_backend_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;
#4 lore raw
Quoted 11 lines · Bartlomiej Zolnierkiewicz

Hi,

Quoted 5 lines · Gustavo A. R. Silva

Hi all,

Friendly ping:

Who can take this?

I'll take this for v5.2.

Patch queued for v5.2, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

#5 lore raw
In reply to Bartlomiej Zolnierkiewicz
Quoted 11 lines · Bartlomiej Zolnierkiewicz

Hi,

Quoted 5 lines · Gustavo A. R. Silva

Hi all,

Friendly ping:

Who can take this?

I'll take this for v5.2.

Patch queued for v5.2, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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

#6 lore raw
In reply to Gustavo A. R. Silva

Hi,

Quoted 5 lines · Gustavo A. R. Silva

Hi all,

Friendly ping:

Who can take this?

I'll take this for v5.2.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Quoted 34 lines

Thanks
--
Gustavo

Quoted 29 lines · Oleksandr Andrushchenko

+Xen-devel list

Quoted 26 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/video/fbdev/xen-fbfront.c: In function ‘xenfb_backend_changed’:
drivers/video/fbdev/xen-fbfront.c:678:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

    if (dev->state == XenbusStateClosed)
       ^
drivers/video/fbdev/xen-fbfront.c:681: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/video/fbdev/xen-fbfront.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/video/fbdev/xen-fbfront.c +0 -0
index 6a4bbc9e1fb0..a3d6b6db221b 100644
@@ -677,7 +677,7 @@ static void xenfb_backend_changed(struct xenbus_device *dev,
Quoted 8 lines

drivers/video/fbdev/xen-fbfront.c static void xenfb_backend_changed(struct xenbus_device *dev, · line 683

Quoted 8 lines
drivers/video/fbdev/xen-fbfront.c +1 -1
      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;

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

#7 lore raw
In reply to Oleksandr Andrushchenko

Hi all,

Friendly ping:

Who can take this?

Thanks
--
Gustavo

Quoted 29 lines · Oleksandr Andrushchenko

+Xen-devel list

Quoted 26 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/video/fbdev/xen-fbfront.c: In function ‘xenfb_backend_changed’:
drivers/video/fbdev/xen-fbfront.c:678:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dev->state == XenbusStateClosed)
       ^
drivers/video/fbdev/xen-fbfront.c:681: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/video/fbdev/xen-fbfront.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
Quoted 5 lines
drivers/video/fbdev/xen-fbfront.c +0 -0
index 6a4bbc9e1fb0..a3d6b6db221b 100644
@@ -677,7 +677,7 @@ static void xenfb_backend_changed(struct xenbus_device *dev,
Quoted 8 lines

      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;

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

#8 lore raw
In reply to Gustavo A. R. Silva

+Xen-devel list

Quoted 31 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/video/fbdev/xen-fbfront.c: In function ‘xenfb_backend_changed’:
drivers/video/fbdev/xen-fbfront.c:678:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

    if (dev->state == XenbusStateClosed)
       ^
drivers/video/fbdev/xen-fbfront.c:681: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/video/fbdev/xen-fbfront.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/xen-fbfront.c +0 -0
index 6a4bbc9e1fb0..a3d6b6db221b 100644

drivers/video/fbdev/xen-fbfront.c static void xenfb_backend_changed(struct xenbus_device *dev, · line 683

Quoted 8 lines
drivers/video/fbdev/xen-fbfront.c +1 -1
@@ -677,7 +677,7 @@ static void xenfb_backend_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;

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