mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: barebox@lists.infradead.org
Subject: [PATCH] net: smc1111: move print_packet function
Date: Thu,  1 Jan 2015 21:04:23 +0100	[thread overview]
Message-ID: <1420142663-6243-3-git-send-email-robert.jarzmik@free.fr> (raw)
In-Reply-To: <1420142663-6243-1-git-send-email-robert.jarzmik@free.fr>

Fix for a compiler complaint, because print_packet is needed by a
function before it is declared.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 drivers/net/smc91111.c | 75 +++++++++++++++++++++++++-------------------------
 1 file changed, 37 insertions(+), 38 deletions(-)

diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 91bb845..100688c 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -583,6 +583,43 @@ static inline void SMC_SELECT_BANK(struct smc91c111_priv *p, int bank)
 	SMC_outw(p, bank, BANK_SELECT);
 }
 
+#if SMC_DEBUG > 2
+static void print_packet( unsigned char * buf, int length )
+{
+	int i;
+	int remainder;
+	int lines;
+
+	printf("Packet of length %d \n", length );
+
+#if SMC_DEBUG > 3
+	lines = length / 16;
+	remainder = length % 16;
+
+	for ( i = 0; i < lines ; i ++ ) {
+		int cur;
+
+		for ( cur = 0; cur < 8; cur ++ ) {
+			unsigned char a, b;
+
+			a = *(buf ++ );
+			b = *(buf ++ );
+			printf("%02x%02x ", a, b );
+		}
+		printf("\n");
+	}
+	for ( i = 0; i < remainder/2 ; i++ ) {
+		unsigned char a, b;
+
+		a = *(buf ++ );
+		b = *(buf ++ );
+		printf("%02x%02x ", a, b );
+	}
+	printf("\n");
+#endif
+}
+#endif
+
 /* note: timeout in seconds */
 static int poll4int(struct smc91c111_priv *priv, unsigned char mask,
 			int timeout)
@@ -1281,44 +1318,6 @@ static void smc_dump_mii_stream (unsigned char * bits, int size)
 }
 #endif
 
-
-#if SMC_DEBUG > 2
-static void print_packet( unsigned char * buf, int length )
-{
-	int i;
-	int remainder;
-	int lines;
-
-	printf("Packet of length %d \n", length );
-
-#if SMC_DEBUG > 3
-	lines = length / 16;
-	remainder = length % 16;
-
-	for ( i = 0; i < lines ; i ++ ) {
-		int cur;
-
-		for ( cur = 0; cur < 8; cur ++ ) {
-			unsigned char a, b;
-
-			a = *(buf ++ );
-			b = *(buf ++ );
-			printf("%02x%02x ", a, b );
-		}
-		printf("\n");
-	}
-	for ( i = 0; i < remainder/2 ; i++ ) {
-		unsigned char a, b;
-
-		a = *(buf ++ );
-		b = *(buf ++ );
-		printf("%02x%02x ", a, b );
-	}
-	printf("\n");
-#endif
-}
-#endif
-
 static int smc91c111_init_dev(struct eth_device *edev)
 {
 	return 0;
-- 
2.1.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-01-01 20:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-01 20:04 [PATCH] commands: loady: fix bug with netconsole Robert Jarzmik
2015-01-01 20:04 ` [PATCH] net: smc1111: fix memory congestions Robert Jarzmik
2015-01-05 12:11   ` Sascha Hauer
2015-01-05 16:16     ` robert.jarzmik
2015-01-06 13:58       ` Sascha Hauer
2015-01-01 20:04 ` Robert Jarzmik [this message]
2015-01-05 12:12   ` [PATCH] net: smc1111: move print_packet function Sascha Hauer
2015-01-05 12:12 ` [PATCH] commands: loady: fix bug with netconsole Sascha Hauer

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=1420142663-6243-3-git-send-email-robert.jarzmik@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=barebox@lists.infradead.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