From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261812AbUBDPGA (ORCPT ); Wed, 4 Feb 2004 10:06:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262446AbUBDPGA (ORCPT ); Wed, 4 Feb 2004 10:06:00 -0500 Received: from p063229.ppp.asahi-net.or.jp ([221.113.63.229]:18419 "EHLO mitou.ysato.dip.jp") by vger.kernel.org with ESMTP id S261812AbUBDPF5 (ORCPT ); Wed, 4 Feb 2004 10:05:57 -0500 Date: Thu, 05 Feb 2004 00:01:16 +0900 Message-ID: From: Yoshinori Sato To: Linus Torvalds Cc: linux kernel Mailing List Subject: [PATCH] H8/300 support update (2/3) User-Agent: Wanderlust/2.11.20 (Wonderwall) SEMI/1.14.5 (Awara-Onsen) LIMIT/1.14.7 (Fujiidera) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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