Skip to contentSkip to conversation

drm/radeon/r300: Mark expected switch fall-throughs

PATCH In review Gustavo A. R. Silva 2 participants 3 messages Oct 12, 2018

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

PATCH 1/1 drm/radeon/r300: Mark expected switch fall-throughs

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

Notice that in this particular case, I replaced "Pass through." with "Fall through.", which is what GCC is expecting to find.

Addresses-Coverity-ID: 114734 ("Missing break in switch")
Addresses-Coverity-ID: 114735 ("Missing break in switch")

---
 drivers/gpu/drm/radeon/r300.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/r300.c +2 -2
index 21161aa..652126f 100644
@@ -814,7 +814,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
 					  ((idx_value >> 21) & 0xF));
 				return -EINVAL;
 			}
-			/* Pass through. */
+			/* Fall through. */
 		case 6:
 			track->cb[i].cpp = 4;
 			break;
@@ -965,7 +965,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
 				return -EINVAL;
 			}
 			/* The same rules apply as for DXT3/5. */
-			/* Pass through. */
+			/* Fall through. */
 		case R300_TX_FORMAT_DXT3:
 		case R300_TX_FORMAT_DXT5:
 			track->textures[i].cpp = 1;
Signature · 1 line
2.7.4
#1 lore raw

This and the r420 patch applied. Thanks!

Alex

Quoted 43 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 replaced "Pass through." with "Fall through.", which is what GCC is expecting to find.

Addresses-Coverity-ID: 114734 ("Missing break in switch")
Addresses-Coverity-ID: 114735 ("Missing break in switch")

---
 drivers/gpu/drm/radeon/r300.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/r300.c +2 -3
index 21161aa..652126f 100644
@@ -814,7 +814,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
                                          ((idx_value >> 21) & 0xF));
                                return -EINVAL;
                        }
-                       /* Pass through. */
+                       /* Fall through. */
                case 6:
                        track->cb[i].cpp = 4;
                        break;
@@ -965,7 +965,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
                                return -EINVAL;
                        }
                        /* The same rules apply as for DXT3/5. */
-                       /* Pass through. */
+                       /* Fall through. */
                case R300_TX_FORMAT_DXT3:
                case R300_TX_FORMAT_DXT5:
                        track->textures[i].cpp = 1;
--

2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw
Quoted 2 lines · Alex Deucher

This and the r420 patch applied. Thanks!

Thanks, Alex. :)
--
Gustavo