mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][REDO] arch: x86: trivial changes to make various functions static
@ 2017-12-06 17:33 Colin King
  2017-12-06 20:06 ` [tip:x86/urgent] x86: Fix Sparse warnings about non-static functions tip-bot for Colin Ian King
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-12-06 17:33 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86, Jiri Kosina,
	Juergen Gross, Andy Lutomirski, Mike Travis, Russ Anderson,
	travis @ sgi . com
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Functions x86_vector_debug_show, clear_non_loaded_ctxs, uv_handle_nmi
and uv_nmi_setup_common are local to the source and do not need to be
in global scope, so make them static. Fixes up various sparse warnings.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---

I've combined 3 earlier patches into 1. Apologies for the noise.

v1: sent as separate patches
v2: send as one combined patch as requested by Ingo

 arch/x86/kernel/apic/vector.c | 4 ++--
 arch/x86/mm/tlb.c             | 2 +-
 arch/x86/platform/uv/uv_nmi.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 6a823a25eaff..750449152b04 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -542,8 +542,8 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq,
 }
 
 #ifdef CONFIG_GENERIC_IRQ_DEBUGFS
-void x86_vector_debug_show(struct seq_file *m, struct irq_domain *d,
-			   struct irq_data *irqd, int ind)
+static void x86_vector_debug_show(struct seq_file *m, struct irq_domain *d,
+				  struct irq_data *irqd, int ind)
 {
 	unsigned int cpu, vector, prev_cpu, prev_vector;
 	struct apic_chip_data *apicd;
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index f75b6eb47a6d..6ecbd8fc292e 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -34,7 +34,7 @@
  * necessary invalidation by clearing out the 'ctx_id' which
  * forces a TLB flush when the context is loaded.
  */
-void clear_non_loaded_ctxs(void)
+static void clear_non_loaded_ctxs(void)
 {
 	u16 asid;
 
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index c34bd8233f7c..5f64f30873e2 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -905,7 +905,7 @@ static inline void uv_call_kgdb_kdb(int cpu, struct pt_regs *regs, int master)
 /*
  * UV NMI handler
  */
-int uv_handle_nmi(unsigned int reason, struct pt_regs *regs)
+static int uv_handle_nmi(unsigned int reason, struct pt_regs *regs)
 {
 	struct uv_hub_nmi_s *hub_nmi = uv_hub_nmi;
 	int cpu = smp_processor_id();
@@ -1013,7 +1013,7 @@ void uv_nmi_init(void)
 }
 
 /* Setup HUB NMI info */
-void __init uv_nmi_setup_common(bool hubbed)
+static void __init uv_nmi_setup_common(bool hubbed)
 {
 	int size = sizeof(void *) * (1 << NODES_SHIFT);
 	int cpu;
-- 
2.14.1

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

* [tip:x86/urgent] x86: Fix Sparse warnings about non-static functions
  2017-12-06 17:33 [PATCH][REDO] arch: x86: trivial changes to make various functions static Colin King
@ 2017-12-06 20:06 ` tip-bot for Colin Ian King
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Colin Ian King @ 2017-12-06 20:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: hpa, trivial, tglx, russ.anderson, mike.travis, mingo,
	colin.king, linux-kernel, torvalds, peterz

Commit-ID:  d553d03f705721fbbfe3ca1c981812d3e488217e
Gitweb:     https://git.kernel.org/tip/d553d03f705721fbbfe3ca1c981812d3e488217e
Author:     Colin Ian King <colin.king@canonical.com>
AuthorDate: Wed, 6 Dec 2017 17:33:58 +0000
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 6 Dec 2017 19:32:58 +0100

x86: Fix Sparse warnings about non-static functions

Functions x86_vector_debug_show(), uv_handle_nmi() and uv_nmi_setup_common()
are local to the source and do not need to be in global scope, so make them
static.

Fixes up various sparse warnings.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Mike Travis <mike.travis@hpe.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <russ.anderson@hpe.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel-janitors@vger.kernel.org
Cc: travis@sgi.com
Link: http://lkml.kernel.org/r/20171206173358.24388-1-colin.king@canonical.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/apic/vector.c | 4 ++--
 arch/x86/platform/uv/uv_nmi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 6a823a2..7504491 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -542,8 +542,8 @@ error:
 }
 
 #ifdef CONFIG_GENERIC_IRQ_DEBUGFS
-void x86_vector_debug_show(struct seq_file *m, struct irq_domain *d,
-			   struct irq_data *irqd, int ind)
+static void x86_vector_debug_show(struct seq_file *m, struct irq_domain *d,
+				  struct irq_data *irqd, int ind)
 {
 	unsigned int cpu, vector, prev_cpu, prev_vector;
 	struct apic_chip_data *apicd;
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index c34bd82..5f64f30 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -905,7 +905,7 @@ static inline void uv_call_kgdb_kdb(int cpu, struct pt_regs *regs, int master)
 /*
  * UV NMI handler
  */
-int uv_handle_nmi(unsigned int reason, struct pt_regs *regs)
+static int uv_handle_nmi(unsigned int reason, struct pt_regs *regs)
 {
 	struct uv_hub_nmi_s *hub_nmi = uv_hub_nmi;
 	int cpu = smp_processor_id();
@@ -1013,7 +1013,7 @@ void uv_nmi_init(void)
 }
 
 /* Setup HUB NMI info */
-void __init uv_nmi_setup_common(bool hubbed)
+static void __init uv_nmi_setup_common(bool hubbed)
 {
 	int size = sizeof(void *) * (1 << NODES_SHIFT);
 	int cpu;

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

end of thread, other threads:[~2017-12-06 20:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 17:33 [PATCH][REDO] arch: x86: trivial changes to make various functions static Colin King
2017-12-06 20:06 ` [tip:x86/urgent] x86: Fix Sparse warnings about non-static functions tip-bot for Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome