A few cleanups for tip-latest
cover A few cleanups for tip-latest
Hi Ingo,
The following three patches are against the latest tip. Please consider.
Thanks,
Dmitri
PATCH 1/3 Fix a couple of sparse warnings in arch/x86/kernel/apic/io_apic.c
Impact: cleanup.
This patch fixes the following sparse warnings:
arch/x86/kernel/apic/io_apic.c:3602:17: warning: symbol 'hpet_msi_type' was not declared. Should it be static?
arch/x86/kernel/apic/io_apic.c:3467:30: warning: Using plain integer as NULL pointer
--- arch/x86/kernel/apic/io_apic.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/apic/io_apic.c +2 -2
@@ -3464,7 +3464,7 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)int ret, sub_handle;struct msi_desc *msidesc;unsigned int irq_want; -struct intel_iommu *iommu =0 ; +struct intel_iommu *iommu =NULL ;int index =0 ; irq_want = nr_irqs_gsi;
@@ -3599,7 +3599,7 @@ static void hpet_msi_set_affinity(unsigned int irq, const struct cpumask *mask)#endif /* CONFIG_SMP */ -struct irq_chip hpet_msi_type = { +static struct irq_chip hpet_msi_type = { .name ="HPET_MSI" , .unmask = hpet_msi_unmask, .mask = hpet_msi_mask,
Signature · 1 line
1.5.6.3
PATCH 2/3 Fix one sparse warning in kernel/extable.c
Impact: cleanup.
The global mutex text_mutex if declared in linux/memory.h, so this file needs to be included into kernel/extable.c, where the same mutex is defined. This fixes the following sparse warning:
kernel/extable.c:32:1: warning: symbol 'text_mutex' was not declared. Should it be static?
--- kernel/extable.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/extable.c +1 -0
@@ -16,6 +16,7 @@Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/ftrace.h> +#include <linux/memory.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/init.h>
Signature · 1 line
1.5.6.3
PATCH 3/3 trace: fix four sparse warnings
Impact: cleanup.
This patch fixes the following sparse warnings:
kernel/trace/trace.c:385:9: warning: symbol 'trace_seq_to_buffer' was not declared. Should it be static?
kernel/trace/trace_clock.c:29:13: warning: symbol 'trace_clock_local' was not declared. Should it be static?
kernel/trace/trace_clock.c:54:13: warning: symbol 'trace_clock' was not declared. Should it be static?
kernel/trace/trace_clock.c:74:13: warning: symbol 'trace_clock_global' was not declared. Should it be static?
--- kernel/trace/trace.c | 2 +- kernel/trace/trace_clock.c | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
kernel/trace/trace.c +1 -1
@@ -382,7 +382,7 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt)return cnt; } -ssize_t trace_seq_to_buffer (struct trace_seq *s,void *buf,size_t cnt) +static ssize_t trace_seq_to_buffer (struct trace_seq *s,void *buf,size_t cnt) {int len;void *ret;
kernel/trace/trace_clock.c +1 -0
@@ -18,6 +18,7 @@#include <linux/percpu.h> #include <linux/sched.h> #include <linux/ktime.h> +#include <linux/trace_clock.h> /* * trace_clock_local(): the simplest and least coherent tracing clock.
Signature · 1 line
1.5.6.3
[tip:tracing/ftrace] tracing: fix four sparse warnings
Commit-ID: b8b94265337f83b7db9c5f429b1769d463d7da8c Gitweb: http://git.kernel.org/tip/b8b94265337f83b7db9c5f429b1769d463d7da8c Author: Dmitri Vorobiev <[email protected]> AuthorDate: Sun, 22 Mar 2009 19:11:11 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 22 Mar 2009 18:16:54 +0100
tracing: fix four sparse warnings
Impact: cleanup.
This patch fixes the following sparse warnings:
kernel/trace/trace.c:385:9: warning: symbol 'trace_seq_to_buffer' was not declared. Should it be static?
kernel/trace/trace_clock.c:29:13: warning: symbol 'trace_clock_local' was not declared. Should it be static?
kernel/trace/trace_clock.c:54:13: warning: symbol 'trace_clock' was not declared. Should it be static?
kernel/trace/trace_clock.c:74:13: warning: symbol 'trace_clock_global' was not declared. Should it be static?
LKML-Reference: <[email protected]>
--- kernel/trace/trace.c | 2 +- kernel/trace/trace_clock.c | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
kernel/trace/trace.c +1 -1
@@ -382,7 +382,7 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt)return cnt; } -ssize_t trace_seq_to_buffer (struct trace_seq *s,void *buf,size_t cnt) +static ssize_t trace_seq_to_buffer (struct trace_seq *s,void *buf,size_t cnt) {int len;void *ret;
kernel/trace/trace_clock.c +1 -0
@@ -18,6 +18,7 @@#include <linux/percpu.h> #include <linux/sched.h> #include <linux/ktime.h> +#include <linux/trace_clock.h> /* * trace_clock_local(): the simplest and least coherent tracing clock.
[tip:tracing/core] tracing, Text Edit Lock: Fix one sparse warning in kernel/extable.c
In reply to Dmitri VorobievCommit-ID: f80d2d7725b04f8225b11b55e43bb2c77c819926 Gitweb: http://git.kernel.org/tip/f80d2d7725b04f8225b11b55e43bb2c77c819926 Author: Dmitri Vorobiev <[email protected]> AuthorDate: Sun, 22 Mar 2009 19:11:10 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 22 Mar 2009 18:16:20 +0100
tracing, Text Edit Lock: Fix one sparse warning in kernel/extable.c
Impact: cleanup.
The global mutex text_mutex if declared in linux/memory.h, so this file needs to be included into kernel/extable.c, where the same mutex is defined. This fixes the following sparse warning:
kernel/extable.c:32:1: warning: symbol 'text_mutex' was not declared. Should it be static?
LKML-Reference: <[email protected]>
--- kernel/extable.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/extable.c +1 -0
@@ -16,6 +16,7 @@Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/ftrace.h> +#include <linux/memory.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/init.h>
[tip:x86/cleanups] x86: Fix a couple of sparse warnings in arch/x86/kernel/apic/io_apic.c
In reply to Dmitri VorobievCommit-ID: 1cc185211a9cb913f6adbe3354e5c256f456ebd2 Gitweb: http://git.kernel.org/tip/1cc185211a9cb913f6adbe3354e5c256f456ebd2 Author: Dmitri Vorobiev <[email protected]> AuthorDate: Sun, 22 Mar 2009 19:11:09 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 22 Mar 2009 18:15:14 +0100
x86: Fix a couple of sparse warnings in arch/x86/kernel/apic/io_apic.c
Impact: cleanup
This patch fixes the following sparse warnings:
arch/x86/kernel/apic/io_apic.c:3602:17: warning: symbol 'hpet_msi_type' was not declared. Should it be static?
arch/x86/kernel/apic/io_apic.c:3467:30: warning: Using plain integer as NULL pointer
LKML-Reference: <[email protected]>
--- arch/x86/kernel/apic/io_apic.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/apic/io_apic.c +2 -2
@@ -3464,7 +3464,7 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)int ret, sub_handle;struct msi_desc *msidesc;unsigned int irq_want; -struct intel_iommu *iommu =0 ; +struct intel_iommu *iommu =NULL ;int index =0 ; irq_want = nr_irqs_gsi;
@@ -3599,7 +3599,7 @@ static void hpet_msi_set_affinity(unsigned int irq, const struct cpumask *mask)#endif /* CONFIG_SMP */ -struct irq_chip hpet_msi_type = { +static struct irq_chip hpet_msi_type = { .name ="HPET_MSI" , .unmask = hpet_msi_unmask, .mask = hpet_msi_mask,
Ingo Molnar
AppliedQuoted 3 lines · Dmitri Vorobiev
Hi Ingo,
The following three patches are against the latest tip. Please consider.
Applied, thanks Dmitri!
Ingo
Quoted 3 lines · Dmitri Vorobiev
Hi Ingo,
The following three patches are against the latest tip. Please consider.
You called the patches
Fix a couple of sparse warnings in arch/x86/kernel/apic/io_apic.c Fix one sparse warning in kernel/extable.c
trace: fix four sparse warnings
Better would have been to tell in the headline what the patches fix in particular. The fact that the issues were found using the static checker sparse is of lesser interest and is documented in the changelog anyway. For example:
x86: io_apic: make a needlessly global symbol static; clean up 0/NULL initialization
kernel: exceptions: add missing include
kernel: trace: make a needlessly global symbol static; add missing include
Signature · 3 lines
Stefan Richter -=====-=-=== -=-= -==-= http://arcgraph.de/sr/