Thread (16 messages) 16 messages, 5 authors, 2025-05-18

Re: [PATCH 4/6] powerpc: fix sparse warnings

From: Madhavan Srinivasan <maddy@linux.ibm.com>
Date: 2025-05-18 03:55:05


On 5/2/25 3:46 PM, Christophe Leroy wrote:

Le 22/04/2025 à 15:10, Madhavan Srinivasan a écrit :
quoted
structs are local to the source and does not need to
be in global scope, so make it static.

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
---
  arch/powerpc/kernel/btext.c              | 2 +-
  arch/powerpc/kernel/setup-common.c       | 2 +-
  arch/powerpc/platforms/powernv/opal.c    | 2 +-
  arch/powerpc/platforms/pseries/lparcfg.c | 2 +-
  4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index 7f63f1cdc6c3..fc7f5a5b6d76 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -40,7 +40,7 @@ static int dispDeviceRect[4] __force_data;
  static unsigned char *dispDeviceBase __force_data;
  static unsigned char *logicalDisplayBase __force_data;
  -unsigned long disp_BAT[2] __initdata = {0, 0};
+static unsigned long disp_BAT[2] __initdata = {0, 0};
disp_BAT is used in assembly, has to remain global:

arch/powerpc/kernel/head_book3s_32.S:   addis   r8,r3,disp_BAT@ha
arch/powerpc/kernel/head_book3s_32.S:   addi    r8,r8,disp_BAT@l
Thought I did a top folder level sweep for this. My bad. 
Nice catch. Will drop this. 

Thanks
Christophe
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help