powerpc/ps3: Remove unused struct table in setup_areas()
Subsystems (2)
PATCH 1/1 powerpc/ps3: Remove unused struct table in setup_areas()
The local table structure is not used - remove it.
Remove % in the comment while at it.
--- arch/powerpc/platforms/ps3/spu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/platforms/ps3/spu.c +1 -3
@@ -185,13 +185,11 @@ static void spu_unmap(struct spu *spu)* The current HV requires the spu shadow regs to be mapped with the * PTE page protection bits set as read-only. * -* Returns: %0 on success or -errno on error. +* Returns: 0 on success or -errno on error. */ static int __init setup_areas (struct spu *spu) { -struct table {char * name;unsigned long addr;unsigned long size;}; -spu_pdata (spu)->shadow =ioremap_prot (spu_pdata (spu)->shadow_addr,sizeof (struct spe_shadow ),pgprot_noncached_wc (PAGE_KERNEL_RO ));
Quoted 5 lines · Thorsten Blum
The local table structure is not used - remove it.
Remove % in the comment while at it.
Signed-off-by Thorsten Blum <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 14 lines · Thorsten Blum
The local table structure is not used - remove it.
Remove % in the comment while at it.
Signed-off-by Thorsten Blum <[email protected]>--- arch/powerpc/platforms/ps3/spu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)arch/powerpc/platforms/ps3/spu.c +0
-0
arch/powerpc/platforms/ps3/spu.c static void spu_unmap(struct spu *spu) · line 188
Quoted 5 lines
arch/powerpc/platforms/ps3/spu.c +1
-1@@ -185,13 +185,11 @@ static void spu_unmap(struct spu *spu)* The current HV requires the spu shadow regs to be mapped with the * PTE page protection bits set as read-only. * -* Returns: %0 on success or -errno on error. +* Returns: 0 on success or -errno on error.
The % prefix should actually be kept here I think. Per the kernel-doc documentation [1]:
%CONST
Name of a constant. (No cross-referencing, just formatting.)
Examples:
%0 %NULL %-1 %-EFAULT %-EINVAL %-ENOMEM
So %0 is valid and intentional kernel-doc markup that renders the constant 0 with proper formatting.
The struct removal part looks good though.
[1]: https://docs.kernel.org/doc-guide/kernel-doc.html#highlights-and-cross-references
~Amit
Quoted 9 lines
arch/powerpc/platforms/ps3/spu.c +0
-2*/ static int __init setup_areas (struct spu *spu) { -struct table {char * name;unsigned long addr;unsigned long size;}; -spu_pdata (spu)->shadow =ioremap_prot (spu_pdata (spu)->shadow_addr,sizeof (struct spe_shadow ),pgprot_noncached_wc (PAGE_KERNEL_RO ));
Quoted 27 lines · Amit Machhiwal
Quoted 14 lines · Thorsten Blum
The local table structure is not used - remove it.
Remove % in the comment while at it.
Signed-off-by Thorsten Blum <[email protected]>--- arch/powerpc/platforms/ps3/spu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)arch/powerpc/platforms/ps3/spu.c +0
-0arch/powerpc/platforms/ps3/spu.c static void spu_unmap(struct spu *spu) · line 188
Quoted 5 lines
arch/powerpc/platforms/ps3/spu.c +1
-1@@ -185,13 +185,11 @@ static void spu_unmap(struct spu *spu)* The current HV requires the spu shadow regs to be mapped with the * PTE page protection bits set as read-only. * -* Returns: %0 on success or -errno on error. +* Returns: 0 on success or -errno on error. The % prefix should actually be kept here I think. Per the kernel-doc documentation [1]:
%CONST
Name of a constant. (No cross-referencing, just formatting.)
Quoted 6 lines
Examples:
%0 %NULL %-1 %-EFAULT %-EINVAL %-ENOMEM
So %0 is valid and intentional kernel-doc markup that renders the constant 0 with proper formatting.
Interesting - not sure I have seen this style before and plain 0 seems to be far more common. There has been some discussion around it here:
https://lore.kernel.org/all/[email protected]/
I guess I'll send a v2 without the %0 change.
Thanks,
Thorsten
Le 12/07/2026 à 17:13, Thorsten Blum a écrit :
Quoted 5 lines
The local table structure is not used - remove it.
Remove % in the comment while at it.
Signed-off-by Thorsten Blum <[email protected]>
Looks like it's never been used since commit de91a5342995 ("[POWERPC] ps3: add spu support") that introduced it.
I have no opinion about the %0 versus 0, is it worth the change ?
Quoted 23 lines
--- arch/powerpc/platforms/ps3/spu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)arch/powerpc/platforms/ps3/spu.c +1
-3@@ -185,13 +185,11 @@ static void spu_unmap(struct spu *spu)* The current HV requires the spu shadow regs to be mapped with the * PTE page protection bits set as read-only. * -* Returns: %0 on success or -errno on error. +* Returns: 0 on success or -errno on error. */ static int __init setup_areas (struct spu *spu) { -struct table {char * name;unsigned long addr;unsigned long size;}; -spu_pdata (spu)->shadow =ioremap_prot (spu_pdata (spu)->shadow_addr,sizeof (struct spe_shadow ),pgprot_noncached_wc (PAGE_KERNEL_RO ));
Madhavan Srinivasan
maintainerQuoted 7 lines · Christophe Leroy (CS GROUP)
Le 12/07/2026 à 17:13, Thorsten Blum a écrit :
Quoted 4 lines
The local table structure is not used - remove it.
Remove % in the comment while at it.
Quoted 8 lines
Quoted 1 line
Signed-off-by Thorsten Blum <[email protected]>Looks like it's never been used since commit
de91a5342995("[POWERPC] ps3: add spu support") that introduced it.Reviewed-by Christophe Leroy (CS GROUP) <[email protected]>I have no opinion about the %0 versus 0, is it worth the change ?
FYI.. I have added this patch as-is to my fixes-test not waiting for v2
Maddy
Quoted 25 lines
Quoted 24 lines
---
arch/powerpc/platforms/ps3/spu.c| 4 +---1 file changed, 1 insertion(+), 3 deletions(-)arch/powerpc/platforms/ps3/spu.c +1
-3@@ -185,13 +185,11 @@ static void spu_unmap(struct spu *spu)* The current HV requires the spu shadow regs to be mapped with the * PTE page protection bits set as read-only. * -* Returns: %0 on success or -errno on error. +* Returns: 0 on success or -errno on error. */ static int __init setup_areas(struct spu *spu) { - struct table {char* name; unsigned long addr; unsigned long size;}; - spu_pdata(spu)->shadow = ioremap_prot(spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow),pgprot_noncached_wc (PAGE_KERNEL_RO ));
Quoted 15 lines · Madhavan Srinivasan
Quoted 13 lines · Christophe Leroy (CS GROUP)
Le 12/07/2026 à 17:13, Thorsten Blum a écrit :
Quoted 5 lines
The local table structure is not used - remove it.
Remove % in the comment while at it.
Signed-off-by Thorsten Blum <[email protected]>Looks like it's never been used since commit
de91a5342995("[POWERPC]
ps3: add spu support") that introduced it.
Quoted 5 lines
Quoted 3 lines
Reviewed-by Christophe Leroy (CS GROUP) <[email protected]>I have no opinion about the %0 versus 0, is it worth the change ?
FYI.. I have added this patch as-is to my fixes-test not waiting for v2
The v2 was already sent Maddy.
https://lore.kernel.org/all/[email protected]/
Thanks,
Amit
Quoted 28 lines
Maddy
Quoted 26 lines
Quoted 25 lines
---
arch/powerpc/platforms/ps3/spu.c| 4 +---1 file changed, 1 insertion(+), 3 deletions(-)arch/powerpc/platforms/ps3/spu.c +1
-3@@ -185,13 +185,11 @@ static void spu_unmap(struct spu *spu)* The current HV requires the spu shadow regs to be mapped with the * PTE page protection bits set as read-only. * -* Returns: %0 on success or -errno on error. +* Returns: 0 on success or -errno on error. */ static int __init setup_areas(struct spu *spu) { - struct table {char* name; unsigned long addr; unsigned long size;}; - spu_pdata(spu)->shadow = ioremap_prot(spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow),pgprot_noncached_wc (PAGE_KERNEL_RO ));
Madhavan Srinivasan
maintainerQuoted 13 lines · Amit Machhiwal
Quoted 12 lines · Madhavan Srinivasan
Quoted 11 lines · Christophe Leroy (CS GROUP)
Le 12/07/2026 à 17:13, Thorsten Blum a écrit :
Quoted 5 lines
The local table structure is not used - remove it.
Remove % in the comment while at it.
Signed-off-by Thorsten Blum <[email protected]>Looks like it's never been used since commit
de91a5342995("[POWERPC]
ps3: add spu support") that introduced it.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Reviewed-by Christophe Leroy (CS GROUP) <[email protected]>I have no opinion about the %0 versus 0, is it worth the change ?
FYI.. I have added this patch as-is to my fixes-test not waiting for v2
The v2 was already sent Maddy.
https://lore.kernel.org/all/[email protected]/
yes I have picked up the v2. My bad, sorry for the noise Maddy
Quoted 28 lines
Thanks,
AmitQuoted 25 lines
Maddy
Quoted 24 lines
Quoted 24 lines
--- arch/powerpc/platforms/ps3/spu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)arch/powerpc/platforms/ps3/spu.c +1
-3@@ -185,13 +185,11 @@ static void spu_unmap(struct spu *spu)* The current HV requires the spu shadow regs to be mapped with the * PTE page protection bits set as read-only. * -* Returns: %0 on success or -errno on error. +* Returns: 0 on success or -errno on error. */ static int __init setup_areas(struct spu *spu) { - struct table {char* name; unsigned long addr; unsigned long size;}; - spu_pdata(spu)->shadow = ioremap_prot(spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow),pgprot_noncached_wc (PAGE_KERNEL_RO ));