Skip to contentSkip to conversation

powerpc: remove unneeded if-checks

PATCH Applied Tom Rix 4 participants 4 messages Apr 28, 2023 – Jul 3, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 powerpc: remove unneeded if-checks

For ppc64, gcc with W=1 reports arch/powerpc/platforms/cell/spu_base.c:330:17: error:
suggest braces around empty body in an 'if' statement [-Werror=empty-body]

  330 |                 ;
      |                 ^
arch/powerpc/platforms/cell/spu_base.c:333:17: error:
  suggest braces around empty body in an 'if' statement [-Werror=empty-body]
  333 |                 ;
      |                 ^

These if-checks do not do anything so remove them.

---
 arch/powerpc/platforms/cell/spu_base.c | 6 ------
 1 file changed, 6 deletions(-)
arch/powerpc/platforms/cell/spu_base.c +0 -6
index 7bd0b563e163..dea6f0f25897 100644
@@ -326,12 +326,6 @@ spu_irq_class_1(int irq, void *data)
 	if (stat & CLASS1_STORAGE_FAULT_INTR)
 		__spu_trap_data_map(spu, dar, dsisr);
 
-	if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_GET_INTR)
-		;
-
-	if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_PUT_INTR)
-		;
-
 	spu->class_1_dsisr = 0;
 	spu->class_1_dar = 0;
 
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw

Le 29/04/2023 à 00:12, Tom Rix a écrit :

Quoted 10 lines

For ppc64, gcc with W=1 reports arch/powerpc/platforms/cell/spu_base.c:330:17: error:
suggest braces around empty body in an 'if' statement [-Werror=empty-body]

   330 |                 ;
       |                 ^
arch/powerpc/platforms/cell/spu_base.c:333:17: error:
   suggest braces around empty body in an 'if' statement [-Werror=empty-body]
   333 |                 ;
       |                 ^
Quoted 3 lines

These if-checks do not do anything so remove them.

Fixes 67207b9664a8 ("[PATCH] spufs: The SPU file system, base")
Quoted 21 lines
---
  arch/powerpc/platforms/cell/spu_base.c | 6 ------
  1 file changed, 6 deletions(-)
arch/powerpc/platforms/cell/spu_base.c +0 -6
index 7bd0b563e163..dea6f0f25897 100644
@@ -326,12 +326,6 @@ spu_irq_class_1(int irq, void *data)
  	if (stat & CLASS1_STORAGE_FAULT_INTR)
  		__spu_trap_data_map(spu, dar, dsisr);
 
-	if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_GET_INTR)
-		;
-
-	if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_PUT_INTR)
-		;
-
  	spu->class_1_dsisr = 0;
  	spu->class_1_dar = 0;
 
Acked-by on v1 1/1
#2 lore raw
In reply to Tom Rix
Quoted 10 lines · Tom Rix

For ppc64, gcc with W=1 reports arch/powerpc/platforms/cell/spu_base.c:330:17: error:
suggest braces around empty body in an 'if' statement [-Werror=empty-body]

  330 |                 ;
      |                 ^
arch/powerpc/platforms/cell/spu_base.c:333:17: error:
  suggest braces around empty body in an 'if' statement [-Werror=empty-body]
  333 |                 ;
      |                 ^
Quoted 3 lines

These if-checks do not do anything so remove them.

The original intention was to document that there are other flags that could be handled here, but clearly nobody is adding code to spufs, so there is no point in keeping that.

#3 lore raw
In reply to Tom Rix
Quoted 11 lines · Tom Rix

For ppc64, gcc with W=1 reports arch/powerpc/platforms/cell/spu_base.c:330:17: error:
suggest braces around empty body in an 'if' statement [-Werror=empty-body]

  330 |                 ;
      |                 ^
arch/powerpc/platforms/cell/spu_base.c:333:17: error:
  suggest braces around empty body in an 'if' statement [-Werror=empty-body]
  333 |                 ;
      |                 ^

[...]

Applied to powerpc/next.

[1/1] powerpc: remove unneeded if-checks

      https://git.kernel.org/powerpc/c/da5311a4b852eaf2c0feac8b28884a8d8a801dfc

cheers