public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <fletch@aracnet.com>
To: Andrew Morton <akpm@zip.com.au>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix 4 compile time warnings in 2.5.53
Date: Tue, 24 Dec 2002 09:36:43 -0800	[thread overview]
Message-ID: <48180000.1040751403@titus> (raw)

Fix the following warnings:

drivers/serial/core.c: In function `uart_get_divisor':
drivers/serial/core.c:390: warning: `quot' might be used uninitialized in 
this function
net/ipv4/route.c: In function `rt_cache_seq_stop':
net/ipv4/route.c:279: warning: unused variable `st'
drivers/net/starfire.c: In function `netdev_close':
drivers/net/starfire.c:1851: warning: unsigned int format, different type 
arg (arg 2)
drivers/net/starfire.c:1858: warning: unsigned int format, different type 
arg (arg 2)
arch/i386/kernel/smpboot.c:691: warning: `wakeup_secondary_via_INIT' 
defined but not used

My build is now eerily quiet.


M.


diff -urpN -X /home/fletch/.diff.exclude virgin/arch/i386/kernel/smpboot.c 
fix_numaq_warning/arch/i386/kernel/smpboot.c
--- virgin/arch/i386/kernel/smpboot.c	Mon Dec 23 23:01:44 2002
+++ fix_numaq_warning/arch/i386/kernel/smpboot.c	Tue Dec 24 08:58:44 2002
@@ -596,6 +596,8 @@ static inline void inquire_remote_apic(i
 }
 #endif

+#ifdef CONFIG_X86_NUMAQ
+
 static int __init wakeup_secondary_via_NMI(int logical_apicid)
 /*
  * Poke the other CPU in the eye to wake it up. Remember that the normal
@@ -644,6 +646,8 @@ static int __init wakeup_secondary_via_N
 	return (send_status | accept_status);
 }

+#else /* ! CONFIG_X86_NUMAQ */
+
 static int __init wakeup_secondary_via_INIT(int phys_apicid, unsigned long 
start_eip)
 {
 	unsigned long send_status = 0, accept_status = 0;
@@ -766,6 +770,8 @@ static int __init wakeup_secondary_via_I

 	return (send_status | accept_status);
 }
+
+#endif /* CONFIG_X86_NUMAQ */

 extern unsigned long cpu_initialized;

diff -urpN -X /home/fletch/.diff.exclude virgin/net/ipv4/route.c 
fix_rtcache_warning/net/ipv4/route.c
--- virgin/net/ipv4/route.c	Mon Dec 23 23:01:58 2002
+++ fix_rtcache_warning/net/ipv4/route.c	Tue Dec 24 09:21:00 2002
@@ -275,11 +275,8 @@ static void *rt_cache_seq_next(struct se

 static void rt_cache_seq_stop(struct seq_file *seq, void *v)
 {
-	if (v && v != (void *)1) {
-		struct rt_cache_iter_state *st = seq->private;
-
+	if (v && v != (void *)1)
 		rcu_read_unlock();
-	}
 }

 static int rt_cache_seq_show(struct seq_file *seq, void *v)
diff -urpN -X /home/fletch/.diff.exclude virgin/drivers/serial/core.c 
fix_serial_warning/drivers/serial/core.c
--- virgin/drivers/serial/core.c	Fri Dec 13 23:18:02 2002
+++ fix_serial_warning/drivers/serial/core.c	Tue Dec 24 08:56:28 2002
@@ -396,7 +396,7 @@ uart_get_divisor(struct uart_port *port,
 		baud = uart_get_baud_rate(port, termios);
 		quot = uart_calculate_quot(port, baud);
 		if (quot)
-			break;
+			return quot;

 		/*
 		 * Oops, the quotient was zero.  Try again with
diff -urpN -X /home/fletch/.diff.exclude virgin/drivers/net/starfire.c 
fix_starfire_warning/drivers/net/starfire.c
--- virgin/drivers/net/starfire.c	Fri Dec 13 23:17:59 2002
+++ fix_starfire_warning/drivers/net/starfire.c	Tue Dec 24 09:18:12 2002
@@ -1847,15 +1847,15 @@ static int netdev_close(struct net_devic

 #ifdef __i386__
 	if (debug > 2) {
-		printk("\n"KERN_DEBUG"  Tx ring at %8.8x:\n",
-			   np->tx_ring_dma);
+		printk("\n"KERN_DEBUG"  Tx ring at %9.9Lx:\n",
+			   (u64) np->tx_ring_dma);
 		for (i = 0; i < 8 /* TX_RING_SIZE is huge! */; i++)
 			printk(KERN_DEBUG " #%d desc. %8.8x %8.8x -> %8.8x.\n",
 			       i, le32_to_cpu(np->tx_ring[i].status),
 			       le32_to_cpu(np->tx_ring[i].first_addr),
 			       le32_to_cpu(np->tx_done_q[i].status));
-		printk(KERN_DEBUG "  Rx ring at %8.8x -> %p:\n",
-		       np->rx_ring_dma, np->rx_done_q);
+		printk(KERN_DEBUG "  Rx ring at %9.9Lx -> %p:\n",
+		       (u64) np->rx_ring_dma, np->rx_done_q);
 		if (np->rx_done_q)
 			for (i = 0; i < 8 /* RX_RING_SIZE */; i++) {
 				printk(KERN_DEBUG " #%d desc. %8.8x -> %8.8x\n",


             reply	other threads:[~2002-12-24 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-24 17:36 Martin J. Bligh [this message]
2002-12-24 18:24 ` [PATCH] Fix 4 compile time warnings in 2.5.53 William Lee Irwin III
2002-12-24 19:04   ` Martin J. Bligh

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=48180000.1040751403@titus \
    --to=fletch@aracnet.com \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.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