linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: ps3: mark ps3_notification_device static for stack usage
@ 2024-03-20 18:03 Arnd Bergmann
  2024-03-21  0:03 ` Geoff Levand
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Arnd Bergmann @ 2024-03-20 18:03 UTC (permalink / raw)
  To: Geoff Levand, Michael Ellerman, Nathan Chancellor,
	Paul Mackerras, Geert Uytterhoeven
  Cc: Kevin Hao, Arnd Bergmann, llvm, Nick Desaulniers, linux-kernel,
	Aneesh Kumar K.V, Nicholas Piggin, Justin Stitt, Naveen N. Rao,
	linuxppc-dev, Bill Wendling

From: Arnd Bergmann <arnd@arndb.de>

The device is way too large to be on the stack, causing a warning for
an allmodconfig build with clang:

arch/powerpc/platforms/ps3/device-init.c:771:12: error: stack frame size (2064) exceeds limit (2048) in 'ps3_probe_thread' [-Werror,-Wframe-larger-than]
  771 | static int ps3_probe_thread(void *data)

There is only a single thread that ever accesses this, so it's fine to
make it static, which avoids the warning.

Fixes: b4cb2941f855 ("[POWERPC] PS3: Use the HVs storage device notification mechanism properly")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/powerpc/platforms/ps3/device-init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
index 878bc160246e..ce99f06698a9 100644
--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -770,7 +770,7 @@ static struct task_struct *probe_task;
 
 static int ps3_probe_thread(void *data)
 {
-	struct ps3_notification_device dev;
+	static struct ps3_notification_device dev;
 	int res;
 	unsigned int irq;
 	u64 lpar;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-22  8:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 18:03 [PATCH] powerpc: ps3: mark ps3_notification_device static for stack usage Arnd Bergmann
2024-03-21  0:03 ` Geoff Levand
2024-03-21  8:32 ` Geert Uytterhoeven
2024-03-21  9:32   ` Geoff Levand
2024-03-22  8:34   ` Geoff Levand
2024-03-22 20:24     ` Arnd Bergmann
2024-03-24  1:19       ` Geoff Levand
2024-03-24  1:23 ` [PATCH] powerpc: Fix PS3 allmodconfig warning Geoff Levand
2024-04-01  7:08   ` [PATCH v2] " Geoff Levand
2024-04-22  8:16     ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).