Commit 8432cdd0 authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds

[PATCH] H8/300 support update (2/3): compiler warnings

o gcc-3.4 warning fix.
parent a899e3c1
...@@ -140,8 +140,9 @@ int request_irq(unsigned int irq, ...@@ -140,8 +140,9 @@ int request_irq(unsigned int irq,
if (use_kmalloc) if (use_kmalloc)
irq_handle = (irq_handler_t *)kmalloc(sizeof(irq_handler_t), GFP_ATOMIC); irq_handle = (irq_handler_t *)kmalloc(sizeof(irq_handler_t), GFP_ATOMIC);
else { else {
irq_handle = alloc_bootmem(sizeof(irq_handler_t)); /* use bootmem allocater */
(unsigned long)irq_handle |= 0x80000000; /* bootmem allocater */ irq_handle = (irq_handler_t *)alloc_bootmem(sizeof(irq_handler_t));
irq_handle = (irq_handler_t *)((unsigned long)irq_handle | 0x80000000);
} }
if (irq_handle == NULL) if (irq_handle == NULL)
...@@ -230,11 +231,9 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -230,11 +231,9 @@ int show_interrupts(struct seq_file *p, void *v)
{ {
int i = *(loff_t *) v; int i = *(loff_t *) v;
if (i < NR_IRQS) { if ((i < NR_IRQS) && (irq_list[i]!=NULL)) {
if (irq_list[i]) { seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
seq_printf(p, "%3d: %10u ",i,irq_list[i]->count); seq_printf(p, "%s\n", irq_list[i]->devname);
seq_printf(p, "%s\n", irq_list[i]->devname);
}
} }
return 0; return 0;
......
...@@ -178,8 +178,9 @@ int request_irq(unsigned int irq, ...@@ -178,8 +178,9 @@ int request_irq(unsigned int irq,
if (use_kmalloc) if (use_kmalloc)
irq_handle = (irq_handler_t *)kmalloc(sizeof(irq_handler_t), GFP_ATOMIC); irq_handle = (irq_handler_t *)kmalloc(sizeof(irq_handler_t), GFP_ATOMIC);
else { else {
irq_handle = alloc_bootmem(sizeof(irq_handler_t)); /* use bootmem allocater */
(unsigned long)irq_handle |= 0x80000000; /* bootmem allocater */ irq_handle = (irq_handler_t *)alloc_bootmem(sizeof(irq_handler_t));
irq_handle = (irq_handler_t *)((unsigned long)irq_handle | 0x80000000);
} }
if (irq_handle == NULL) if (irq_handle == NULL)
...@@ -282,11 +283,9 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -282,11 +283,9 @@ int show_interrupts(struct seq_file *p, void *v)
{ {
int i = *(loff_t *) v; int i = *(loff_t *) v;
if (i < NR_IRQS) { if ((i < NR_IRQS) && (irq_list[i] !=NULL)) {
if (irq_list[i]) { seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
seq_printf(p, "%3d: %10u ",i,irq_list[i]->count); seq_printf(p, "%s\n", irq_list[i]->devname);
seq_printf(p, "%s\n", irq_list[i]->devname);
}
} }
return 0; return 0;
......
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