Commit 1a2706b0 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k gcc-3.2 warnings

M68k: Kill warnings generated by gcc-3.2:
  - Add missing <linux/string.h> include
  - Move unused static data inside usage area
  - Kill deprecated multi-line string literals
  - Add semicolons to empty cases in switch() constructs
  - Comment out unused labels
  - Fix extra tokens at end of #endif directives
  - a3000_release() may not be optimized away
  - Kill uninitialized variable warning
parent c0557225
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/string.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/amigahw.h> #include <asm/amigahw.h>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/string.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/amigahw.h> #include <asm/amigahw.h>
......
...@@ -48,7 +48,6 @@ static void dn_heartbeat(int on); ...@@ -48,7 +48,6 @@ static void dn_heartbeat(int on);
static void dn_timer_int(int irq,void *, struct pt_regs *); static void dn_timer_int(int irq,void *, struct pt_regs *);
static void (*sched_timer_handler)(int, void *, struct pt_regs *)=NULL; static void (*sched_timer_handler)(int, void *, struct pt_regs *)=NULL;
static void dn_get_model(char *model); static void dn_get_model(char *model);
static int dn_cpuctrl=0xff00;
static const char *apollo_models[] = { static const char *apollo_models[] = {
"DN3000 (Otter)", "DN3000 (Otter)",
"DN3010 (Otter)", "DN3010 (Otter)",
...@@ -290,6 +289,8 @@ static void dn_get_model(char *model) ...@@ -290,6 +289,8 @@ static void dn_get_model(char *model)
} }
#ifdef CONFIG_HEARTBEAT #ifdef CONFIG_HEARTBEAT
static int dn_cpuctrl=0xff00;
static void dn_heartbeat(int on) { static void dn_heartbeat(int on) {
if(on) { if(on) {
......
...@@ -273,29 +273,29 @@ asmlinkage void atari_prio_irq_handler( void ); ...@@ -273,29 +273,29 @@ asmlinkage void atari_prio_irq_handler( void );
/* Dummy function to allow asm with operands. */ /* Dummy function to allow asm with operands. */
void atari_fast_prio_irq_dummy (void) { void atari_fast_prio_irq_dummy (void) {
__asm__ (__ALIGN_STR "\n" __asm__ (__ALIGN_STR "\n"
"atari_fast_irq_handler: "atari_fast_irq_handler:\n\t"
orw #0x700,%%sr /* disable all interrupts */ "orw #0x700,%%sr\n" /* disable all interrupts */
atari_prio_irq_handler:\t "atari_prio_irq_handler:\n\t"
addl %3,%2\n" /* preempt_count() += HARDIRQ_OFFSET */ "addl %3,%2\n\t" /* preempt_count() += HARDIRQ_OFFSET */
SAVE_ALL_INT "\n" SAVE_ALL_INT "\n\t"
GET_CURRENT(%%d0) " GET_CURRENT(%%d0) "\n\t"
/* get vector number from stack frame and convert to source */ /* get vector number from stack frame and convert to source */
bfextu %%sp@(%c1){#4,#10},%%d0 "bfextu %%sp@(%c1){#4,#10},%%d0\n\t"
subw #(0x40-8),%%d0 "subw #(0x40-8),%%d0\n\t"
jpl 1f "jpl 1f\n\t"
addw #(0x40-8-0x18),%%d0 "addw #(0x40-8-0x18),%%d0\n"
1: lea %a0,%%a0 "1:\tlea %a0,%%a0\n\t"
addql #1,%%a0@(%%d0:l:4) "addql #1,%%a0@(%%d0:l:4)\n\t"
lea irq_handler,%%a0 "lea irq_handler,%%a0\n\t"
lea %%a0@(%%d0:l:8),%%a0 "lea %%a0@(%%d0:l:8),%%a0\n\t"
pea %%sp@ /* push frame address */ "pea %%sp@\n\t" /* push frame address */
movel %%a0@(4),%%sp@- /* push handler data */ "movel %%a0@(4),%%sp@-\n\t" /* push handler data */
movel %%d0,%%sp@- /* push int number */ "movel %%d0,%%sp@-\n\t" /* push int number */
movel %%a0@,%%a0 "movel %%a0@,%%a0\n\t"
jsr %%a0@ /* and call the handler */ "jsr %%a0@\n\t" /* and call the handler */
addql #8,%%sp "addql #8,%%sp\n\t"
addql #4,%%sp "addql #4,%%sp\n\t"
jbra ret_from_interrupt" "jbra ret_from_interrupt"
: : "i" (&kstat_cpu(0).irqs), "n" (PT_OFF_FORMATVEC), : : "i" (&kstat_cpu(0).irqs), "n" (PT_OFF_FORMATVEC),
"m" (preempt_count()), "di" (HARDIRQ_OFFSET) "m" (preempt_count()), "di" (HARDIRQ_OFFSET)
); );
...@@ -308,10 +308,10 @@ atari_prio_irq_handler:\t ...@@ -308,10 +308,10 @@ atari_prio_irq_handler:\t
*/ */
asmlinkage void falcon_hblhandler(void); asmlinkage void falcon_hblhandler(void);
asm(".text\n" asm(".text\n"
__ALIGN_STR "\n" __ALIGN_STR "\n\t"
"falcon_hblhandler: "falcon_hblhandler:\n\t"
orw #0x200,%sp@ /* set saved ipl to 2 */ "orw #0x200,%sp@\n\t" /* set saved ipl to 2 */
rte"); "rte");
/* Defined in entry.S; only increments 'num_spurious' */ /* Defined in entry.S; only increments 'num_spurious' */
asmlinkage void bad_interrupt(void); asmlinkage void bad_interrupt(void);
......
...@@ -127,6 +127,7 @@ int q40_request_irq(unsigned int irq, ...@@ -127,6 +127,7 @@ int q40_request_irq(unsigned int irq,
printk("warning IRQ 10 and 11 not distinguishable\n"); printk("warning IRQ 10 and 11 not distinguishable\n");
irq=10; irq=10;
default: default:
;
} }
if (irq<Q40_IRQ_SAMPLE) if (irq<Q40_IRQ_SAMPLE)
...@@ -174,6 +175,7 @@ void q40_free_irq(unsigned int irq, void *dev_id) ...@@ -174,6 +175,7 @@ void q40_free_irq(unsigned int irq, void *dev_id)
return; return;
case 11: irq=10; case 11: irq=10;
default: default:
;
} }
if (irq<Q40_IRQ_SAMPLE) if (irq<Q40_IRQ_SAMPLE)
...@@ -315,7 +317,7 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp) ...@@ -315,7 +317,7 @@ void q40_irq2_handler (int vec, void *devname, struct pt_regs *fp)
unsigned mir, mer; unsigned mir, mer;
int irq,i; int irq,i;
repeat: //repeat:
mir=master_inb(IIRQ_REG); mir=master_inb(IIRQ_REG);
if (mir&Q40_IRQ_FRAME_MASK) { if (mir&Q40_IRQ_FRAME_MASK) {
irq_tab[Q40_IRQ_FRAME].count++; irq_tab[Q40_IRQ_FRAME].count++;
......
...@@ -97,7 +97,7 @@ static void print_holes(struct list_head *holes) ...@@ -97,7 +97,7 @@ static void print_holes(struct list_head *holes)
printk("end of hole listing...\n"); printk("end of hole listing...\n");
} }
#endif DVMA_DEBUG #endif /* DVMA_DEBUG */
static inline int refill(void) static inline int refill(void)
{ {
......
...@@ -225,7 +225,7 @@ static Scsi_Host_Template driver_template = { ...@@ -225,7 +225,7 @@ static Scsi_Host_Template driver_template = {
#include "scsi_module.c" #include "scsi_module.c"
int __exit a3000_release(struct Scsi_Host *instance) int a3000_release(struct Scsi_Host *instance)
{ {
wd33c93_release(); wd33c93_release();
DMA(instance)->CNTR = 0; DMA(instance)->CNTR = 0;
......
...@@ -1217,8 +1217,8 @@ static void NCR5380_dma_complete( struct Scsi_Host *instance ) ...@@ -1217,8 +1217,8 @@ static void NCR5380_dma_complete( struct Scsi_Host *instance )
BASR_ACK)) == BASR_ACK)) ==
(BASR_PHASE_MATCH | BASR_ACK)) { (BASR_PHASE_MATCH | BASR_ACK)) {
printk("scsi%d: BASR %02x\n", HOSTNO, NCR5380_read(BUS_AND_STATUS_REG)); printk("scsi%d: BASR %02x\n", HOSTNO, NCR5380_read(BUS_AND_STATUS_REG));
printk("scsi%d: bus stuck in data phase -- probably a printk("scsi%d: bus stuck in data phase -- probably a single byte "
single byte overrun!\n", HOSTNO); "overrun!\n", HOSTNO);
printk("not prepared for this error!\n"); printk("not prepared for this error!\n");
printk("please e-mail sammy@sammy.net with a description of how this\n"); printk("please e-mail sammy@sammy.net with a description of how this\n");
printk("error was produced.\n"); printk("error was produced.\n");
......
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
#define FC_SUPERD 5 #define FC_SUPERD 5
#define FC_CPU 7 #define FC_CPU 7
#endif __SUN3_HEAD_H #endif /* __SUN3_HEAD_H */
...@@ -101,21 +101,24 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz ...@@ -101,21 +101,24 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
case 1: case 1:
tmp = *(u8 *)ptr; tmp = *(u8 *)ptr;
*(u8 *)ptr = x; *(u8 *)ptr = x;
x = tmp;
break; break;
case 2: case 2:
tmp = *(u16 *)ptr; tmp = *(u16 *)ptr;
*(u16 *)ptr = x; *(u16 *)ptr = x;
x = tmp;
break; break;
case 4: case 4:
tmp = *(u32 *)ptr; tmp = *(u32 *)ptr;
*(u32 *)ptr = x; *(u32 *)ptr = x;
x = tmp;
break; break;
default: default:
BUG(); BUG();
} }
local_irq_restore(flags); local_irq_restore(flags);
return tmp; return x;
} }
#else #else
static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment