All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix 4 compile time warnings in 2.5.53
@ 2002-12-24 17:36 Martin J. Bligh
  2002-12-24 18:24 ` William Lee Irwin III
  0 siblings, 1 reply; 3+ messages in thread
From: Martin J. Bligh @ 2002-12-24 17:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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",


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix 4 compile time warnings in 2.5.53
  2002-12-24 17:36 [PATCH] Fix 4 compile time warnings in 2.5.53 Martin J. Bligh
@ 2002-12-24 18:24 ` William Lee Irwin III
  2002-12-24 19:04   ` Martin J. Bligh
  0 siblings, 1 reply; 3+ messages in thread
From: William Lee Irwin III @ 2002-12-24 18:24 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Andrew Morton, linux-kernel

On Tue, Dec 24, 2002 at 09:36:43AM -0800, Martin J. Bligh wrote:
> 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

This is a (harmless) toolchain problem. Upgrading compilers (or patching
your current compiler) fixes it. I've posted a "fix" for this before.


On Tue, Dec 24, 2002 at 09:36:43AM -0800, Martin J. Bligh wrote:
> net/ipv4/route.c: In function `rt_cache_seq_stop':
> net/ipv4/route.c:279: warning: unused variable `st'

Fair enough.


On Tue, Dec 24, 2002 at 09:36:43AM -0800, Martin J. Bligh wrote:
> 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)

Hmm, I thought I got this one into jgarzik's tree. I posted a fix for this
one too.


On Tue, Dec 24, 2002 at 09:36:43AM -0800, Martin J. Bligh wrote:
> arch/i386/kernel/smpboot.c:691: warning: `wakeup_secondary_via_INIT' 
> defined but not used
> My build is now eerily quiet.

This one's all you. =)


Bill

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix 4 compile time warnings in 2.5.53
  2002-12-24 18:24 ` William Lee Irwin III
@ 2002-12-24 19:04   ` Martin J. Bligh
  0 siblings, 0 replies; 3+ messages in thread
From: Martin J. Bligh @ 2002-12-24 19:04 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: Andrew Morton, linux-kernel

>> drivers/serial/core.c: In function `uart_get_divisor':
>> drivers/serial/core.c:390: warning: `quot' might be used uninitialized
>> in  this function
>
> This is a (harmless) toolchain problem. Upgrading compilers (or patching
> your current compiler) fixes it. I've posted a "fix" for this before.

I refuse to upgrade the compiler on every machine in the lab from
standard Debian woody to fix one stupid compiler error. This is a
completely harmless substitution that makes the error go away. We
don't live in a theoretical utopia.

M.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-12-24 18:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-24 17:36 [PATCH] Fix 4 compile time warnings in 2.5.53 Martin J. Bligh
2002-12-24 18:24 ` William Lee Irwin III
2002-12-24 19:04   ` Martin J. Bligh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.