Skip to contentSkip to conversation

H8/300 support update (2/3)

PATCH New Yoshinori Sato 1 participant 1 message Feb 4, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 H8/300 support update (2/3)

o gcc-3.4 warning fix.

arch/h8300/platform/h8300h/ints.c +6 -7
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
@@ -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;
arch/h8300/platform/h8s/ints.c +6 -7
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
@@ -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;
Signature · 2 lines
Yoshinori Sato
<[email protected]>