Skip to contentSkip to conversation

drm/radeon: Add break to switch statement in radeonfb_create_pinned_object()

PATCH Applied Nathan Chancellor 3 participants 3 messages Aug 15, 2021 – Aug 16, 2021

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

PATCH 1/1 drm/radeon: Add break to switch statement in radeonfb_create_pinned_object()

Clang + -Wimplicit-fallthrough warns:

drivers/gpu/drm/radeon/radeon_fb.c:170:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]

        default:
        ^
drivers/gpu/drm/radeon/radeon_fb.c:170:2: note: insert 'break;' to avoid
fall-through
        default:
        ^
        break;

1 warning generated.

Clang's version of this warning is a little bit more pedantic than GCC's. Add the missing break to satisfy it to match what has been done all over the kernel tree.

---
 drivers/gpu/drm/radeon/radeon_fb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/radeon/radeon_fb.c +1 -0
index 0b206b052972..c8b545181497 100644
@@ -167,6 +167,7 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev,
 		break;
 	case 2:
 		tiling_flags |= RADEON_TILING_SWAP_16BIT;
+		break;
 	default:
 		break;
 	}

base-commit: ba31f97d43be41ca99ab72a6131d7c226306865f

Signature · 1 line
2.33.0.rc2
maintainer Reviewed-by on v1 1/1
#1 lore raw

Am 15.08.21 um 21:29 schrieb Nathan Chancellor:

Quoted 11 lines

Clang + -Wimplicit-fallthrough warns:

drivers/gpu/drm/radeon/radeon_fb.c:170:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]

         default:
         ^
drivers/gpu/drm/radeon/radeon_fb.c:170:2: note: insert 'break;' to avoid
fall-through
         default:
         ^
         break;
Quoted 7 lines

1 warning generated.

Clang's version of this warning is a little bit more pedantic than GCC's. Add the missing break to satisfy it to match what has been done all over the kernel tree.

Quoted 18 lines
---
  drivers/gpu/drm/radeon/radeon_fb.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/radeon/radeon_fb.c +1 -0
index 0b206b052972..c8b545181497 100644
@@ -167,6 +167,7 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev,
  		break;
  	case 2:
  		tiling_flags |= RADEON_TILING_SWAP_16BIT;
+		break;
  	default:
  		break;
  	}

base-commit: ba31f97d43be41ca99ab72a6131d7c226306865f

Applied
#2 lore raw

Applied. Thanks!

Alex

Quoted 42 lines · Christian König

Am 15.08.21 um 21:29 schrieb Nathan Chancellor:

Quoted 11 lines

Clang + -Wimplicit-fallthrough warns:

drivers/gpu/drm/radeon/radeon_fb.c:170:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]

         default:
         ^
drivers/gpu/drm/radeon/radeon_fb.c:170:2: note: insert 'break;' to avoid
fall-through
         default:
         ^
         break;
Quoted 7 lines

1 warning generated.

Clang's version of this warning is a little bit more pedantic than GCC's. Add the missing break to satisfy it to match what has been done all over the kernel tree.

Quoted 18 lines
---
  drivers/gpu/drm/radeon/radeon_fb.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/radeon/radeon_fb.c +1 -0
index 0b206b052972..c8b545181497 100644
@@ -167,6 +167,7 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev,
              break;
      case 2:
              tiling_flags |= RADEON_TILING_SWAP_16BIT;
+             break;
      default:
              break;
      }

base-commit: ba31f97d43be41ca99ab72a6131d7c226306865f