linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/platform/uv: make const pointer dots a static const array
@ 2021-11-27 17:03 Colin Ian King
  2021-11-30 19:34 ` Steve Wahl
  0 siblings, 1 reply; 6+ messages in thread
From: Colin Ian King @ 2021-11-27 17:03 UTC (permalink / raw)
  To: Steve Wahl, Mike Travis, Dimitri Sivanich, Russ Anderson,
	Darren Hart, Andy Shevchenko, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H . Peter Anvin,
	platform-driver-x86
  Cc: kernel-janitors, linux-kernel

Don't populate the const array dots on the stack but make it static
const and make the pointer an array to remove a dereference. Shrinks
object code a few bytes too.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 arch/x86/platform/uv/uv_nmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index 1e9ff28bc2e0..2c69a0c30632 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -725,7 +725,7 @@ static void uv_nmi_dump_cpu_ip(int cpu, struct pt_regs *regs)
  */
 static void uv_nmi_dump_state_cpu(int cpu, struct pt_regs *regs)
 {
-	const char *dots = " ................................. ";
+	static const char dots[] = " ................................. ";
 
 	if (cpu == 0)
 		uv_nmi_dump_cpu_ip_hdr();
-- 
2.33.1


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

end of thread, other threads:[~2021-12-02  9:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-27 17:03 [PATCH] x86/platform/uv: make const pointer dots a static const array Colin Ian King
2021-11-30 19:34 ` Steve Wahl
2021-12-01  0:26   ` Joe Perches
2021-12-01 21:39     ` Steve Wahl
2021-12-02  9:10       ` Hans de Goede
2021-12-02  9:21         ` Colin King (gmail)

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).