mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Matthias Kaehlcke <matthias@kaehlcke.net>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ep93xx eth driver: dump_xxx() cleanup
Date: Wed, 3 Feb 2010 12:12:53 +0100	[thread overview]
Message-ID: <20100203111253.GQ6130@pengutronix.de> (raw)
In-Reply-To: <20100202184719.GS8053@darwin>

On Tue, Feb 02, 2010 at 07:47:19PM +0100, Matthias Kaehlcke wrote:
> ep93xx eth driver dump_xxx() functions: Use %p to print pointer values,
> remove unnecessary parentheses and declare as static
> 
> Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>

Ok, applied both patches.

Sascha


> ---
>  drivers/net/ep93xx.c |   54 +++++++++++++++++++++++++-------------------------
>  1 files changed, 27 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/net/ep93xx.c b/drivers/net/ep93xx.c
> index 7f909b2..a63eac1 100644
> --- a/drivers/net/ep93xx.c
> +++ b/drivers/net/ep93xx.c
> @@ -61,34 +61,34 @@ static inline struct mac_regs *ep93xx_get_regs(struct eth_device *edev)
>  /**
>   * Dump ep93xx_mac values to the terminal.
>   */
> -inline void dump_dev(struct eth_device *edev)
> +static void dump_dev(struct eth_device *edev)
>  {
>  	struct ep93xx_eth_priv *priv = ep93xx_get_priv(edev);
>  	int i;
>  
>  	printf("\ndump_dev()\n");
> -	printf("  rx_dq.base	     %08X\n", priv->rx_dq.base);
> -	printf("  rx_dq.current	     %08X\n", priv->rx_dq.current);
> -	printf("  rx_dq.end	     %08X\n", priv->rx_dq.end);
> -	printf("  rx_sq.base	     %08X\n", priv->rx_sq.base);
> -	printf("  rx_sq.current	     %08X\n", priv->rx_sq.current);
> -	printf("  rx_sq.end	     %08X\n", priv->rx_sq.end);
> +	printf("  rx_dq.base	     %p\n", priv->rx_dq.base);
> +	printf("  rx_dq.current	     %p\n", priv->rx_dq.current);
> +	printf("  rx_dq.end	     %p\n", priv->rx_dq.end);
> +	printf("  rx_sq.base	     %p\n", priv->rx_sq.base);
> +	printf("  rx_sq.current	     %p\n", priv->rx_sq.current);
> +	printf("  rx_sq.end	     %p\n", priv->rx_sq.end);
>  
>  	for (i = 0; i < NUMRXDESC; i++)
> -		printf("  rx_buffer[%2.d]      %08X\n", i, NetRxPackets[i]);
> -
> -	printf("  tx_dq.base	     %08X\n", priv->tx_dq.base);
> -	printf("  tx_dq.current	     %08X\n", priv->tx_dq.current);
> -	printf("  tx_dq.end	     %08X\n", priv->tx_dq.end);
> -	printf("  tx_sq.base	     %08X\n", priv->tx_sq.base);
> -	printf("  tx_sq.current	     %08X\n", priv->tx_sq.current);
> -	printf("  tx_sq.end	     %08X\n", priv->tx_sq.end);
> +		printf("  rx_buffer[%2.d]      %p\n", i, NetRxPackets[i]);
> +
> +	printf("  tx_dq.base	     %p\n", priv->tx_dq.base);
> +	printf("  tx_dq.current	     %p\n", priv->tx_dq.current);
> +	printf("  tx_dq.end	     %p\n", priv->tx_dq.end);
> +	printf("  tx_sq.base	     %p\n", priv->tx_sq.base);
> +	printf("  tx_sq.current	     %p\n", priv->tx_sq.current);
> +	printf("  tx_sq.end	     %p\n", priv->tx_sq.end);
>  }
>  
>  /**
>   * Dump all RX descriptor queue entries to the terminal.
>   */
> -inline void dump_rx_descriptor_queue(struct eth_device *edev)
> +static void dump_rx_descriptor_queue(struct eth_device *edev)
>  {
>  	struct ep93xx_eth_priv *priv = ep93xx_get_priv(edev);
>  	int i;
> @@ -96,8 +96,8 @@ inline void dump_rx_descriptor_queue(struct eth_device *edev)
>  	printf("\ndump_rx_descriptor_queue()\n");
>  	printf("  descriptor address	 word1		 word2\n");
>  	for (i = 0; i < NUMRXDESC; i++) {
> -		printf("  [ %08X ]	     %08X	 %08X\n",
> -			(priv->rx_dq.base + i),
> +		printf("  [ %p ]	     %08X	 %08X\n",
> +			priv->rx_dq.base + i,
>  			(priv->rx_dq.base + i)->word1,
>  			(priv->rx_dq.base + i)->word2);
>  	}
> @@ -106,7 +106,7 @@ inline void dump_rx_descriptor_queue(struct eth_device *edev)
>  /**
>   * Dump all RX status queue entries to the terminal.
>   */
> -inline void dump_rx_status_queue(struct eth_device *edev)
> +static void dump_rx_status_queue(struct eth_device *edev)
>  {
>  	struct ep93xx_eth_priv *priv = ep93xx_get_priv(edev);
>  	int i;
> @@ -114,8 +114,8 @@ inline void dump_rx_status_queue(struct eth_device *edev)
>  	printf("\ndump_rx_status_queue()\n");
>  	printf("  descriptor address	 word1		 word2\n");
>  	for (i = 0; i < NUMRXDESC; i++) {
> -		printf("  [ %08X ]	     %08X	 %08X\n",
> -			(priv->rx_sq.base + i),
> +		printf("  [ %p ]	     %08X	 %08X\n",
> +			priv->rx_sq.base + i,
>  			(priv->rx_sq.base + i)->word1,
>  			(priv->rx_sq.base + i)->word2);
>  	}
> @@ -124,7 +124,7 @@ inline void dump_rx_status_queue(struct eth_device *edev)
>  /**
>   * Dump all TX descriptor queue entries to the terminal.
>   */
> -inline void dump_tx_descriptor_queue(struct eth_device *edev)
> +static void dump_tx_descriptor_queue(struct eth_device *edev)
>  {
>  	struct ep93xx_eth_priv *priv = ep93xx_get_priv(edev);
>  	int i;
> @@ -132,8 +132,8 @@ inline void dump_tx_descriptor_queue(struct eth_device *edev)
>  	printf("\ndump_tx_descriptor_queue()\n");
>  	printf("  descriptor address	 word1		 word2\n");
>  	for (i = 0; i < NUMTXDESC; i++) {
> -		printf("  [ %08X ]	     %08X	 %08X\n",
> -			(priv->tx_dq.base + i),
> +		printf("  [ %p ]	     %08X	 %08X\n",
> +			priv->tx_dq.base + i,
>  			(priv->tx_dq.base + i)->word1,
>  			(priv->tx_dq.base + i)->word2);
>  	}
> @@ -142,7 +142,7 @@ inline void dump_tx_descriptor_queue(struct eth_device *edev)
>  /**
>   * Dump all TX status queue entries to the terminal.
>   */
> -inline void dump_tx_status_queue(struct eth_device *edev)
> +static void dump_tx_status_queue(struct eth_device *edev)
>  {
>  	struct ep93xx_eth_priv *priv = ep93xx_get_priv(edev);
>  	int i;
> @@ -150,8 +150,8 @@ inline void dump_tx_status_queue(struct eth_device *edev)
>  	printf("\ndump_tx_status_queue()\n");
>  	printf("  descriptor address	 word1\n");
>  	for (i = 0; i < NUMTXDESC; i++) {
> -		printf("  [ %08X ]	     %08X\n",
> -			(priv->rx_sq.base + i),
> +		printf("  [ %p ]	     %08X\n",
> +			priv->rx_sq.base + i,
>  			(priv->rx_sq.base + i)->word1);
>  	}
>  }
> -- 
> 1.6.5
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      reply	other threads:[~2010-02-03 11:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 18:47 Matthias Kaehlcke
2010-02-03 11:12 ` Sascha Hauer [this message]

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=20100203111253.GQ6130@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=matthias@kaehlcke.net \
    /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