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

From: Yoshinori Sato
Date: Wed Feb 04 2004 - 10:08:33 EST


o gcc-3.4 warning fix.

diff -X .exclude-diff -Nru linux-2.6.2/arch/h8300/platform/h8300h/ints.c linux-2.6.2-h8300/arch/h8300/platform/h8300h/ints.c
--- linux-2.6.2/arch/h8300/platform/h8300h/ints.c 2004-02-02 01:02:57.000000000 +0900
+++ linux-2.6.2-h8300/arch/h8300/platform/h8300h/ints.c 2004-02-04 23:36:33.000000000 +0900
@@ -140,8 +140,9 @@
if (use_kmalloc)
irq_handle = (irq_handler_t *)kmalloc(sizeof(irq_handler_t), GFP_ATOMIC);
else {
- irq_handle = alloc_bootmem(sizeof(irq_handler_t));
- (unsigned long)irq_handle |= 0x80000000; /* bootmem allocater */
+ /* use 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)
@@ -230,11 +231,9 @@
{
int i = *(loff_t *) v;

- if (i < NR_IRQS) {
- if (irq_list[i]) {
- seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
- seq_printf(p, "%s\n", irq_list[i]->devname);
- }
+ if ((i < NR_IRQS) && (irq_list[i]!=NULL)) {
+ seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
+ seq_printf(p, "%s\n", irq_list[i]->devname);
}

return 0;
diff -X .exclude -Nru linux-2.6.2/arch/h8300/platform/h8s/ints.c linux-2.6.2-h8300/arch/h8300/platform/h8s/ints.c
--- linux-2.6.2/arch/h8300/platform/h8s/ints.c 2004-02-02 01:02:57.000000000 +0900
+++ linux-2.6.2-h8300/arch/h8300/platform/h8s/ints.c 2004-02-02 02:09:58.000000000 +0900
@@ -178,8 +178,9 @@
if (use_kmalloc)
irq_handle = (irq_handler_t *)kmalloc(sizeof(irq_handler_t), GFP_ATOMIC);
else {
- irq_handle = alloc_bootmem(sizeof(irq_handler_t));
- (unsigned long)irq_handle |= 0x80000000; /* bootmem allocater */
+ /* use 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)
@@ -282,11 +283,9 @@
{
int i = *(loff_t *) v;

- if (i < NR_IRQS) {
- if (irq_list[i]) {
- seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
- seq_printf(p, "%s\n", irq_list[i]->devname);
- }
+ if ((i < NR_IRQS) && (irq_list[i] !=NULL)) {
+ seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
+ seq_printf(p, "%s\n", irq_list[i]->devname);
}

return 0;

--
Yoshinori Sato
<ysato@xxxxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/