Hi Ingo,
The following three patches are against the latest tip. Please consider.
Thanks,
Dmitri
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
Signed-off-by: Dmitri Vorobiev <[email protected]>
---
arch/x86/kernel/apic/io_apic.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index d882c03..86827d8 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -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,
--
1.5.6.3
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?
Signed-off-by: Dmitri Vorobiev <[email protected]>
---
kernel/extable.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/extable.c b/kernel/extable.c
index d679abb..cd9250d 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -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>
--
1.5.6.3
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?
Signed-off-by: Dmitri Vorobiev <[email protected]>
---
kernel/trace/trace.c | 2 +-
kernel/trace/trace_clock.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index e6fac0f..ace685c 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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;
diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
index 05b176a..b588fd8 100644
--- a/kernel/trace/trace_clock.c
+++ b/kernel/trace/trace_clock.c
@@ -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.
--
1.5.6.3
* Dmitri Vorobiev <[email protected]> wrote:
> Hi Ingo,
>
> The following three patches are against the latest tip. Please consider.
Applied, thanks Dmitri!
Ingo
Dmitri Vorobiev wrote:
> 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
--
Stefan Richter
-=====-=-=== -=-= -==-=
http://arcgraph.de/sr/
Commit-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
Signed-off-by: Dmitri Vorobiev <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/apic/io_apic.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 42cdc78..ea97e5e 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -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,
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?
Signed-off-by: Dmitri Vorobiev <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
kernel/trace/trace.c | 2 +-
kernel/trace/trace_clock.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index e6fac0f..ace685c 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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;
diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
index 05b176a..b588fd8 100644
--- a/kernel/trace/trace_clock.c
+++ b/kernel/trace/trace_clock.c
@@ -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.
Commit-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?
Signed-off-by: Dmitri Vorobiev <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
kernel/extable.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/extable.c b/kernel/extable.c
index 25d39b0..b54a601 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -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>