public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] fix sn_serial warning
Date: Mon, 29 Mar 2004 18:58:47 +0000	[thread overview]
Message-ID: <200403291058.47096.jbarnes@sgi.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

In my fixes to quiet the sn_serial driver, I made sn_debug_printf only get 
used when the DEBUG define was turned on in the driver but forgot to #ifdef 
out the function definition, causing an 'defined but not used' warning.  This 
patch fixes that.

Jesse

[-- Attachment #2: sn-serial-warning-fixes.patch --]
[-- Type: text/plain, Size: 802 bytes --]

===== drivers/char/sn_serial.c 1.10 vs edited =====
--- 1.10/drivers/char/sn_serial.c	Mon Mar 22 02:29:18 2004
+++ edited/drivers/char/sn_serial.c	Mon Mar 29 10:48:14 2004
@@ -82,10 +82,10 @@
 static unsigned long sn_interrupt_timeout;
 
 extern u64 master_node_bedrock_address;
-static int sn_debug_printf(const char *fmt, ...);
 
 #undef DEBUG
 #ifdef DEBUG
+static int sn_debug_printf(const char *fmt, ...);
 #define DPRINTF(x...) sn_debug_printf(x)
 #else
 #define DPRINTF(x...) do { } while (0)
@@ -247,6 +247,7 @@
 	sn_func->sal_puts(s, count);
 }
 
+#ifdef DEBUG
 /* this is as "close to the metal" as we can get, used when the driver
  * itself may be broken */
 static int
@@ -262,6 +263,7 @@
 	va_end(args);
 	return printed_len;
 }
+#endif /* DEBUG */
 
 /*
  * Interrupt handling routines.

                 reply	other threads:[~2004-03-29 18:58 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=200403291058.47096.jbarnes@sgi.com \
    --to=jbarnes@sgi.com \
    --cc=linux-ia64@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