public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] H8/300 support update (2/3)
Date: Thu, 05 Feb 2004 00:01:16 +0900	[thread overview]
Message-ID: <m2ad3yq477.wl%ysato@users.sourceforge.jp> (raw)

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>

                 reply	other threads:[~2004-02-04 15:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ad3yq477.wl%ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox