[PATCH] powerpc: remove unneeded if-checks

2023-04-28 Thread 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 | ;
  | ^

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

Signed-off-by: Tom Rix 
---
 arch/powerpc/platforms/cell/spu_base.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spu_base.c 
b/arch/powerpc/platforms/cell/spu_base.c
index 7bd0b563e163..dea6f0f25897 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -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;
 
-- 
2.27.0



[PATCH] soc: fsl: qe: remove unused qe_ic_from_irq function

2023-03-19 Thread Tom Rix
clang with W=1 reports
drivers/soc/fsl/qe/qe_ic.c:235:29: error: unused function
  'qe_ic_from_irq' [-Werror,-Wunused-function]
static inline struct qe_ic *qe_ic_from_irq(unsigned int virq)
^
This function is not used, so remove it.

Signed-off-by: Tom Rix 
---
 drivers/soc/fsl/qe/qe_ic.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c
index bbae3d39c7be..c0b4f865fba9 100644
--- a/drivers/soc/fsl/qe/qe_ic.c
+++ b/drivers/soc/fsl/qe/qe_ic.c
@@ -232,11 +232,6 @@ static inline void qe_ic_write(__be32  __iomem *base, 
unsigned int reg,
iowrite32be(value, base + (reg >> 2));
 }
 
-static inline struct qe_ic *qe_ic_from_irq(unsigned int virq)
-{
-   return irq_get_chip_data(virq);
-}
-
 static inline struct qe_ic *qe_ic_from_irq_data(struct irq_data *d)
 {
return irq_data_get_irq_chip_data(d);
-- 
2.27.0



[PATCH v2] soc: fsl: qe: remove unused qe_ic_from_irq function

2023-03-20 Thread Tom Rix
clang with W=1 reports
drivers/soc/fsl/qe/qe_ic.c:235:29: error: unused function
  'qe_ic_from_irq' [-Werror,-Wunused-function]
static inline struct qe_ic *qe_ic_from_irq(unsigned int virq)
^
The use of this function was removed with
commit d7c2878cfcfa ("soc: fsl: qe: remove unused qe_ic_set_* functions")

This function is not used, so remove it.

Signed-off-by: Tom Rix 
---
v2: Add to commit log when the use was removed.

---
 drivers/soc/fsl/qe/qe_ic.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c
index bbae3d39c7be..c0b4f865fba9 100644
--- a/drivers/soc/fsl/qe/qe_ic.c
+++ b/drivers/soc/fsl/qe/qe_ic.c
@@ -232,11 +232,6 @@ static inline void qe_ic_write(__be32  __iomem *base, 
unsigned int reg,
iowrite32be(value, base + (reg >> 2));
 }
 
-static inline struct qe_ic *qe_ic_from_irq(unsigned int virq)
-{
-   return irq_get_chip_data(virq);
-}
-
 static inline struct qe_ic *qe_ic_from_irq_data(struct irq_data *d)
 {
return irq_data_get_irq_chip_data(d);
-- 
2.27.0



Re: [PATCH] powerpc/8xx: select CPM1 for MPC8XXFADS

2021-06-02 Thread Tom Rix



On 6/2/21 12:44 AM, Christophe Leroy wrote:



Le 01/06/2021 à 19:53, t...@redhat.com a écrit :

From: Tom Rix 

With MPC8XXFADS, there is this linker error
ppc64-linux-ld: m8xx_setup.o: in function `cpm_cascade':
m8xx_setup.c: undefined reference to `cpm_get_irq'


It looks like this config item is stale, it doesn't build any board 
support, there is no define_machine() for this config item, no file is 
linked to that config item.


I think you should just remove that item from the possible choices.


Yes, this looks like a dead config and removing it is what to do.

I withdraw this change.

I am looking at sweeping the tree of dead configs.

Up a dir, my finder shows

PPC_MMU_NOHASH_32

is another (maybe) dead config.

Thanks for pointing this out,

Tom


Christophe




cpm_get_irq() is conditionally complied by CPM1
So add a select, like the other plaforms

Signed-off-by: Tom Rix 
---
  arch/powerpc/platforms/8xx/Kconfig | 1 +
  1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/platforms/8xx/Kconfig 
b/arch/powerpc/platforms/8xx/Kconfig

index 60cc5b537a98..919082cdb2f1 100644
--- a/arch/powerpc/platforms/8xx/Kconfig
+++ b/arch/powerpc/platforms/8xx/Kconfig
@@ -10,6 +10,7 @@ choice
    config MPC8XXFADS
  bool "FADS"
+    select CPM1
    config MPC86XADS
  bool "MPC86XADS"







Re: [PATCH] powerpc: Remove CONFIG_PPC_MMU_NOHASH_32

2021-06-03 Thread Tom Rix



On 6/3/21 12:53 AM, Christophe Leroy wrote:

Since commit Fixes: 555904d07eef ("powerpc/8xx: MM_SLICE is not needed 
anymore"),
CONFIG_PPC_MMU_NOHASH_32 has not been used.

Remove it.

Reported-by: Tom Rix 
Signed-off-by: Christophe Leroy 


Thanks, one less for me to do.

There are about ~100 similar tree wide, I'll be posting these soon.

Tom


---
  arch/powerpc/platforms/Kconfig.cputype | 4 
  1 file changed, 4 deletions(-)

diff --git a/arch/powerpc/platforms/Kconfig.cputype 
b/arch/powerpc/platforms/Kconfig.cputype
index 885140055b7a..dc7c46f92302 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -424,10 +424,6 @@ config PPC_MMU_NOHASH
def_bool y
depends on !PPC_BOOK3S
  
-config PPC_MMU_NOHASH_32

-   def_bool y
-   depends on PPC_MMU_NOHASH && PPC32
-
  config PPC_BOOK3E_MMU
def_bool y
depends on FSL_BOOKE || PPC_BOOK3E