sparc: fix a few sparse warnings
Hi Dave et al.
I spent a few hours fixing some trivial sparse warnings. I spent some time trying to find a good way to fix the floppy related warnings from irq_32.c but gave up.
The best solution would be to move the interrupt handler to floppy_32.h (as we do with sparc64) so we keep the dependencies local.
And if we do this maybe we should just rewrite it to C anyway. But that requires some sparc assembler knowledge, and the real gain is minimal so I dropped it.
The patches add more lines than they remove - mostly because this is about adding proper extern decalarations for several functions.
I decided to go for a common entry.h file. Because I hope there will be more shared stuff in there over time.
And the same argument applies for kernel.h.
There are 138 warnings to go in kernel/ and many of these are simple to fix. But they are for another day.
Sam
Sam Ravnborg (5):
sparc: fix sparse warning in kernel/pmc.c
sparc: fix trivial style issues in kernel/pmc.c
sparc: fix sparse warnings in traps_32.c
sparc: add include guards to kernel.h
sparc: fix sparse warnings in irq_32.c
arch/sparc/include/asm/irq_32.h | 1 + arch/sparc/kernel/entry.h | 39 ++++++++++++++++++++++++++++++++++++++- arch/sparc/kernel/irq_32.c | 7 ++++--- arch/sparc/kernel/kernel.h | 23 +++++++++++++++++++++++ arch/sparc/kernel/muldiv.c | 5 ++--- arch/sparc/kernel/pmc.c | 18 +++++++++--------- arch/sparc/kernel/sun4d_irq.c | 2 +- arch/sparc/kernel/traps_32.c | 34 +++------------------------------- 8 files changed, 81 insertions(+), 48 deletions(-)
From: Sam Ravnborg <[email protected]>
Date: Sun, 7 Dec 2008 21:33:30 +0100
Quoted 6 lines
The best solution would be to move the interrupt handler to
floppy_32.h(as we do with sparc64) so we keep the dependencies local.
And if we do this maybe we should just rewrite it to C anyway. But that requires some sparc assembler knowledge, and the real gain is minimal so I dropped it.
Unfortunately it's in assembler on sparc32 for a reason.
You'll drop data bytes and overflow the floppy controller FIFO on very old sparc32 systems, particular sun4c ones, if we try to do this in C code.