mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: "David S. Miller" <davem@redhat.com>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6 IrDA] irlan -- print_ret_code
Date: Wed, 14 Apr 2004 15:18:13 -0700	[thread overview]
Message-ID: <20040414221813.GE5434@bougret.hpl.hp.com> (raw)

irXXX_irlan_print_ret.diff :
~~~~~~~~~~~~~~~~~~~~~~~~~~
		<Patch from Stephen Hemminger>
	o [FEATURE] Move print_ret_code from a global to local to avoid
		namespace pollution.


diff -Nru a/include/net/irda/irlan_common.h b/include/net/irda/irlan_common.h
--- a/include/net/irda/irlan_common.h	Fri Mar 19 11:29:08 2004
+++ b/include/net/irda/irlan_common.h	Fri Mar 19 11:29:08 2004
@@ -219,7 +219,6 @@
 			     __u16 value_len);
 
 int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len);
-void print_ret_code(__u8 code);
 
 #endif
 
diff -Nru a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c
--- a/net/irda/irlan/irlan_client.c	Fri Mar 19 11:29:08 2004
+++ b/net/irda/irlan/irlan_client.c	Fri Mar 19 11:29:08 2004
@@ -343,6 +343,52 @@
 	irttp_data_request(self->client.tsap_ctrl, skb);	
 }
 
+
+/*
+ * Function print_ret_code (code)
+ *
+ *    Print return code of request to peer IrLAN layer.
+ *
+ */
+static void print_ret_code(__u8 code) 
+{
+	switch(code) {
+	case 0:
+		printk(KERN_INFO "Success\n");
+		break;
+	case 1:
+		WARNING("IrLAN: Insufficient resources\n");
+		break;
+	case 2:
+		WARNING("IrLAN: Invalid command format\n");
+		break;
+	case 3:
+		WARNING("IrLAN: Command not supported\n");
+		break;
+	case 4:
+		WARNING("IrLAN: Parameter not supported\n");
+		break;
+	case 5:
+		WARNING("IrLAN: Value not supported\n");
+		break;
+	case 6:
+		WARNING("IrLAN: Not open\n");
+		break;
+	case 7:
+		WARNING("IrLAN: Authentication required\n");
+		break;
+	case 8:
+		WARNING("IrLAN: Invalid password\n");
+		break;
+	case 9:
+		WARNING("IrLAN: Protocol error\n");
+		break;
+	case 255:
+		WARNING("IrLAN: Asynchronous status\n");
+		break;
+	}
+}
+
 /*
  * Function irlan_client_parse_response (self, skb)
  *
diff -Nru a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
--- a/net/irda/irlan/irlan_common.c	Fri Mar 19 11:29:08 2004
+++ b/net/irda/irlan/irlan_common.c	Fri Mar 19 11:29:08 2004
@@ -1168,51 +1168,6 @@
 }
 #endif
 
-/*
- * Function print_ret_code (code)
- *
- *    Print return code of request to peer IrLAN layer.
- *
- */
-void print_ret_code(__u8 code) 
-{
-	switch(code) {
-	case 0:
-		printk(KERN_INFO "Success\n");
-		break;
-	case 1:
-		WARNING("IrLAN: Insufficient resources\n");
-		break;
-	case 2:
-		WARNING("IrLAN: Invalid command format\n");
-		break;
-	case 3:
-		WARNING("IrLAN: Command not supported\n");
-		break;
-	case 4:
-		WARNING("IrLAN: Parameter not supported\n");
-		break;
-	case 5:
-		WARNING("IrLAN: Value not supported\n");
-		break;
-	case 6:
-		WARNING("IrLAN: Not open\n");
-		break;
-	case 7:
-		WARNING("IrLAN: Authentication required\n");
-		break;
-	case 8:
-		WARNING("IrLAN: Invalid password\n");
-		break;
-	case 9:
-		WARNING("IrLAN: Protocol error\n");
-		break;
-	case 255:
-		WARNING("IrLAN: Asynchronous status\n");
-		break;
-	}
-}
-
 MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>");
 MODULE_DESCRIPTION("The Linux IrDA LAN protocol"); 
 MODULE_LICENSE("GPL");

                 reply	other threads:[~2004-04-14 22:19 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=20040414221813.GE5434@bougret.hpl.hp.com \
    --to=jt@bougret.hpl.hp.com \
    --cc=davem@redhat.com \
    --cc=jt@hpl.hp.com \
    --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

all inboxes | Powered by JetHome®