x86: fix a couple of sparse warnings
Hi Ingo, Peter, Thomas,
Here is a couple of patches that fix sparse warnings produced while compiling defconfig for i386:
<<<<<
arch/x86/kernel/reboot.c:32:5: warning: symbol 'reboot_force' was not declared. Should it be static?
arch/x86/kernel/pci-dma.c:17:5: warning: symbol 'iommu_sac_force' was not declared. Should it be static?
<<<<<
These patches were compile-tested using defconfig for both i386 and x86_64. Also, a runtime test was successfully performed by booting i386 and x86_64 boxes up to the shell prompt.
Patches apply cleanly to current x86.git.
Please consider.
Thanks,
Dmitri Vorobiev
PATCH 1/2 x86: iommu_sac_force can become static
The iommu_sac_force variable is needlessly defined global, and this patch makes it static. Additionally, this variable needs not be explicitly initialized.
--- arch/x86/kernel/pci-dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/pci-dma.c +1 -1
@@ -14,7 +14,7 @@ EXPORT_SYMBOL(forbid_dac);const struct dma_mapping_ops *dma_ops;EXPORT_SYMBOL (dma_ops); -int iommu_sac_force__read_mostly =0 ; +static int iommu_sac_force__read_mostly ;#ifdef CONFIG_IOMMU_DEBUG int panic_on_overflow__read_mostly =1 ;
Signature · 1 line
1.5.3.6
PATCH 2/2 x86: add proper header for reboot_force
In reply to Dmitri VorobievThis patch fixes one sparse warning by including the appropriate header for the reboot_force symbol.
--- arch/x86/kernel/reboot.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/reboot.c +1 -0
@@ -9,6 +9,7 @@#include <asm/desc.h> #include <asm/hpet.h> #include <asm/pgtable.h> +#include <asm/proto.h> #include <asm/reboot_fixups.h> #include <asm/reboot.h>
Signature · 1 line
1.5.3.6
Quoted 4 lines · Dmitri Vorobiev
Hi Ingo, Peter, Thomas,
Here is a couple of patches that fix sparse warnings produced while compiling defconfig for i386:
thanks Dmitri, applied.
Ingo
Quoted 9 lines · Ingo Molnar
Quoted 4 lines · Dmitri Vorobiev
Hi Ingo, Peter, Thomas,
Here is a couple of patches that fix sparse warnings produced while compiling defconfig for i386:
thanks Dmitri, applied.
/me wonders what was wrong with http://lkml.org/lkml/2008/4/23/131
that contains a superset of the first patch
(and got no response at all)
Quoted 1 line
Ingo
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed2008/4/28 Adrian Bunk <[email protected]>:
Quoted 7 lines · Ingo Molnar
Quoted 5 lines · Dmitri Vorobiev
Quoted 3 lines
Hi Ingo, Peter, Thomas,
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Here is a couple of patches that fix sparse warnings produced while compiling defconfig for i386:
thanks Dmitri, applied.
/me wonders what was wrong with http://lkml.org/lkml/2008/4/23/131
that contains a superset of the first patch
(and got no response at all)
Adrian, I am sorry for duplicating your work. The clash wasn't intentional: I did not notice your earlier patch in the high traffic of this mailing list.
Thanks,
Dimitri
Quoted 11 lines · Dmitri Vorobiev
2008/4/28 Adrian Bunk <[email protected]>:
Quoted 10 lines · Ingo Molnar
Quoted 8 lines · Dmitri Vorobiev
Quoted 5 lines
Hi Ingo, Peter, Thomas,
Here is a couple of patches that fix sparse warnings produced while compiling defconfig for i386:
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
thanks Dmitri, applied.
/me wonders what was wrong with http://lkml.org/lkml/2008/4/23/131
that contains a superset of the first patch
(and got no response at all)Adrian, I am sorry for duplicating your work. The clash wasn't intentional: I did not notice your earlier patch in the high traffic of this mailing list.
No problem, and I'm actually more interested why my patch got lost.
Quoted 2 lines
Thanks,
Dimitri
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 7 lines · Adrian Bunk
Quoted 6 lines · Dmitri Vorobiev
2008/4/28 Adrian Bunk <[email protected]>:
Quoted 4 lines
/me wonders what was wrong with http://lkml.org/lkml/2008/4/23/131
that contains a superset of the first patch
(and got no response at all)
Quoted 5 lines
Quoted 3 lines
Adrian, I am sorry for duplicating your work. The clash wasn't
intentional: I did not notice your earlier patch in the high traffic of this mailing list.No problem, and I'm actually more interested why my patch got lost.
It's simple: in this case i had two patches in my backlog, one from a new person and one from a frequent contributor - doing the very same change. I preferred the newbie's patch, to encourage Dmitri to keep contributing to Linux and to help him learn from the experience of working with various Linux maintainers.
You contributed a lot of similar changes already, and are 1500 similar patches down the line, and for "trivial" patches like this you probably aren't going to learn anything new.
That doesn't mean your work is not appreciated - there's 5 of your patches queued up in x86.git this very moment [one of them is a subset of the patch you mention above] and a few more in my mbox, but it does mean that for a case like this, the newbie's change wins. And that applies to my own changes just as much : often a newbie submits a cleanup that i have done already but i'll put in the newbie's patch and drop mine.
Ingo
Quoted 14 lines · Ingo Molnar
Quoted 11 lines · Adrian Bunk
Quoted 9 lines · Dmitri Vorobiev
2008/4/28 Adrian Bunk <[email protected]>:
Quoted 4 lines
/me wonders what was wrong with http://lkml.org/lkml/2008/4/23/131
that contains a superset of the first patch
(and got no response at all)Adrian, I am sorry for duplicating your work. The clash wasn't
intentional: I did not notice your earlier patch in the high traffic of this mailing list.
Quoted 8 lines
Quoted 1 line
No problem, and I'm actually more interested why my patch got lost.
It's simple: in this case i had two patches in my backlog, one from a new person and one from a frequent contributor - doing the very same change. I preferred the newbie's patch, to encourage Dmitri to keep contributing to Linux and to help him learn from the experience of working with various Linux maintainers.
...
Every maintainer except you will teach the newbie where to find the current tree to avoid duplicating work...
But OK, instead of spending my time duplicating later patches I'll put possible cleanups and bugs for x86 on a list and check 1 or 2 months later whether they are still present.
Quoted 1 line
Ingo
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 24 lines · Adrian Bunk
Quoted 14 lines · Ingo Molnar
Quoted 11 lines · Adrian Bunk
Quoted 9 lines · Dmitri Vorobiev
2008/4/28 Adrian Bunk <[email protected]>:
Quoted 4 lines
/me wonders what was wrong with http://lkml.org/lkml/2008/4/23/131
that contains a superset of the first patch
(and got no response at all)Adrian, I am sorry for duplicating your work. The clash wasn't
intentional: I did not notice your earlier patch in the high traffic of this mailing list.Quoted 8 lines
Quoted 1 line
No problem, and I'm actually more interested why my patch got lost.
It's simple: in this case i had two patches in my backlog, one from a new person and one from a frequent contributor - doing the very same change. I preferred the newbie's patch, to encourage Dmitri to keep contributing to Linux and to help him learn from the experience of working with various Linux maintainers.
...
Quoted 2 lines
Every maintainer except you will teach the newbie where to find the current tree to avoid duplicating work...
I have seen Ingo referring to his README file countless number of times which describes where to locate the x86.git tree and how to pull it. So has you.
Sam