Skip to contentSkip to conversation

powerpc/kvm: Fall through switch case explicitly

PATCH Applied Santosh Sivaraj 4 participants 9 messages Jul 29, 2019 – Jul 30, 2019

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

PATCH 1/1 powerpc/kvm: Fall through switch case explicitly

Implicit fallthrough warning was enabled globally which broke the build. Make it explicit with a fall through comment.

---
 arch/powerpc/kvm/book3s_32_mmu.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kvm/book3s_32_mmu.c +1 -0
index 653936177857..18f244aad7aa 100644
@@ -239,6 +239,7 @@ static int kvmppc_mmu_book3s_32_xlate_pte(struct kvm_vcpu *vcpu, gva_t eaddr,
 				case 2:
 				case 6:
 					pte->may_write = true;
+					/* fall through */
 				case 3:
 				case 5:
 				case 7:
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Santosh,

Quoted 24 lines · On Mon, 29 Jul 2019 11:25:36 +0530 Santosh Sivaraj <[email protected]> wrote:

Implicit fallthrough warning was enabled globally which broke the build. Make it explicit with a fall through comment.

---
 arch/powerpc/kvm/book3s_32_mmu.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kvm/book3s_32_mmu.c +1 -0
index 653936177857..18f244aad7aa 100644
@@ -239,6 +239,7 @@ static int kvmppc_mmu_book3s_32_xlate_pte(struct kvm_vcpu *vcpu, gva_t eaddr,
 				case 2:
 				case 6:
 					pte->may_write = true;
+					/* fall through */
 				case 3:
 				case 5:
 				case 7:
Signature · 1 line
2.20.1

Thanks

This only shows up as a warning in a powerpc allyesconfig build.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
Quoted 8 lines · Stephen Rothwell

Hi Santosh,

Quoted 5 lines · On Mon, 29 Jul 2019 11:25:36 +0530 Santosh Sivaraj <[email protected]> wrote:

Implicit fallthrough warning was enabled globally which broke the build. Make it explicit with a fall through comment.

Thanks!
--
Gustavo

Quoted 26 lines
Quoted 19 lines
---
 arch/powerpc/kvm/book3s_32_mmu.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kvm/book3s_32_mmu.c +1 -0
index 653936177857..18f244aad7aa 100644
@@ -239,6 +239,7 @@ static int kvmppc_mmu_book3s_32_xlate_pte(struct kvm_vcpu *vcpu, gva_t eaddr,
 				case 2:
 				case 6:
 					pte->may_write = true;
+					/* fall through */
 				case 3:
 				case 5:
 				case 7:
Signature · 1 line
2.20.1

Thanks

This only shows up as a warning in a powerpc allyesconfig build.

#3 lore raw

Hi all,

Quoted 8 lines · On Mon, 29 Jul 2019 18:45:40 -0500 "Gustavo A. R. Silva"…
Quoted 6 lines · Stephen Rothwell
Quoted 4 lines · On Mon, 29 Jul 2019 11:25:36 +0530 Santosh Sivaraj <[email protected]> wrote:

Implicit fallthrough warning was enabled globally which broke the build. Make it explicit with a fall through comment.

Quoted 34 lines
Quoted 1 line
Quoted 1 line

Thanks!
--
Gustavo

Quoted 26 lines
Quoted 19 lines
---
 arch/powerpc/kvm/book3s_32_mmu.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kvm/book3s_32_mmu.c +1 -0
index 653936177857..18f244aad7aa 100644
@@ -239,6 +239,7 @@ static int kvmppc_mmu_book3s_32_xlate_pte(struct kvm_vcpu *vcpu, gva_t eaddr,
 				case 2:
 				case 6:
 					pte->may_write = true;
+					/* fall through */
 				case 3:
 				case 5:
 				case 7:
Signature · 1 line
2.20.1

Thanks

This only shows up as a warning in a powerpc allyesconfig build.

I will apply this to linux-next today (and keep it until it turns up in some other tree).

Signature · 2 lines
Cheers,
Stephen Rothwell
#4 lore raw

Hi Stephen,

Quoted 41 lines · Stephen Rothwell

Hi all,

Quoted 38 lines · On Mon, 29 Jul 2019 18:45:40 -0500 "Gustavo A. R. Silva"…
Quoted 7 lines · Stephen Rothwell
Quoted 5 lines · On Mon, 29 Jul 2019 11:25:36 +0530 Santosh Sivaraj <[email protected]> wrote:

Implicit fallthrough warning was enabled globally which broke the build. Make it explicit with a fall through comment.

Thanks!
--
Gustavo

Quoted 22 lines
Quoted 19 lines
---
 arch/powerpc/kvm/book3s_32_mmu.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kvm/book3s_32_mmu.c +1 -0
index 653936177857..18f244aad7aa 100644
@@ -239,6 +239,7 @@ static int kvmppc_mmu_book3s_32_xlate_pte(struct kvm_vcpu *vcpu, gva_t eaddr,
 				case 2:
 				case 6:
 					pte->may_write = true;
+					/* fall through */
 				case 3:
 				case 5:
 				case 7:
Signature · 1 line
2.20.1

Thanks

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

This only shows up as a warning in a powerpc allyesconfig build.

I will apply this to linux-next today (and keep it until it turns up in some other tree).

If no one takes it by tomorrow, I'll take it in my tree.

Thanks!
--
Gustavo

#5 lore raw

Hi Gustavo,

Quoted 2 lines · On Mon, 29 Jul 2019 22:30:34 -0500 "Gustavo A. R. Silva"…

If no one takes it by tomorrow, I'll take it in my tree.

I am assuming that Michael Ellerman will take it into his fixes tree and send it to Lunis fairly soon as it actually breaks some powerpc builds.

Signature · 2 lines
Cheers,
Stephen Rothwell
#6 lore raw
Quoted 10 lines · Stephen Rothwell

Hi Gustavo,

Quoted 2 lines · On Mon, 29 Jul 2019 22:30:34 -0500 "Gustavo A. R. Silva"…

If no one takes it by tomorrow, I'll take it in my tree.

I am assuming that Michael Ellerman will take it into his fixes tree and send it to Lunis fairly soon as it actually breaks some powerpc builds.

Yeah. It seems that now that -Wimplicit-fallthrough has been globally enabled, that's the case for all of these patches.

Anyway, I can always take them in my tree if needed.

Thanks
--
Gustavo

#7 lore raw

Hi Gustavo,

Quoted 9 lines · On Mon, 29 Jul 2019 22:57:05 -0500 "Gustavo A. R. Silva"…
Quoted 4 lines · Stephen Rothwell

I am assuming that Michael Ellerman will take it into his fixes tree and send it to Lunis fairly soon as it actually breaks some powerpc builds.

Yeah. It seems that now that -Wimplicit-fallthrough has been globally enabled, that's the case for all of these patches.

Only some of them cause failures (as opposed to warnings) .. in this case because arch/powerpc is built with -Werror.

Signature · 2 lines
Cheers,
Stephen Rothwell
#8 lore raw
In reply to Santosh Sivaraj
Quoted 6 lines · Santosh Sivaraj

Implicit fallthrough warning was enabled globally which broke the build. Make it explicit with a fall through comment.

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/705d0abbcc7adf04743d04ea8754acbcdf21c326

cheers