* [PATCH] H8/300 support update (2/3)
@ 2004-02-04 15:01 Yoshinori Sato
0 siblings, 0 replies; only message in thread
From: Yoshinori Sato @ 2004-02-04 15:01 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux kernel Mailing List
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@users.sourceforge.jp>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-02-04 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-04 15:01 [PATCH] H8/300 support update (2/3) Yoshinori Sato
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox