All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: ftmac100: remove unncessary volatiles
Date: Thu, 20 Jan 2011 18:38:04 +0300	[thread overview]
Message-ID: <4D3856DC.10605@mvista.com> (raw)
In-Reply-To: <1295537003-1789-1-git-send-email-ratbert.chuang@gmail.com>

Hello.

Po-Yu Chuang wrote:

> From: Po-Yu Chuang <ratbert@faraday-tech.com>

> This patch also update get_timer() usage.

    This seems like a material for a separate patch.

> Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
> ---
>  drivers/net/ftmac100.c |   20 +++++++++-----------
>  1 files changed, 9 insertions(+), 11 deletions(-)

> diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
> index 2328cb5..787d69b 100644
> --- a/drivers/net/ftmac100.c
> +++ b/drivers/net/ftmac100.c
[...]
> @@ -219,14 +219,12 @@ ftmac100_send (struct eth_device *dev, volatile void *packet, int length)
>  	curr_des->txdes0 = FTMAC100_TXDES0_TXDMA_OWN;
>  
>  	/* start transmit */
> -
>  	writel (1, &ftmac100->txpd);
>  
>  	/* wait for transfer to succeed */
> -
> -	tmo = get_timer (0) + 5 * CONFIG_SYS_HZ;
> +	start = get_timer (0);
>  	while (curr_des->txdes0 & FTMAC100_TXDES0_TXDMA_OWN) {
> -		if (get_timer (0) >= tmo) {
> +		if (get_timer (start) >= 5) {

    I'm not sure this is equivalent to the old code...

>  			debug ("%s(): timed out\n", __func__);
>  			return -1;
>  		}

    checkpatch.pl says:

WARNING: space prohibited between function name and open parenthesis '('
#66: FILE: drivers/net/ftmac100.c:225:
+	start = get_timer (0);

WARNING: space prohibited between function name and open parenthesis '('
#69: FILE: drivers/net/ftmac100.c:227:
+		if (get_timer (start) >= 5) {

    I know you're only modifying the existing code, but it's time to fix the 
style of it as well...

WBR, Sergei

  reply	other threads:[~2011-01-20 15:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 15:23 [U-Boot] [PATCH] net: ftmac100: remove unncessary volatiles Po-Yu Chuang
2011-01-20 15:38 ` Sergei Shtylyov [this message]
2011-01-21  6:26   ` Po-Yu Chuang
2011-01-21  7:50 ` [U-Boot] [PATCH v2 1/2] " Po-Yu Chuang
2011-03-21 21:53   ` Wolfgang Denk
2011-01-21  7:51 ` [U-Boot] [PATCH v2 2/2] net: ftmac100: update get_timer() usages Po-Yu Chuang
2011-02-25 11:16   ` Macpaul Lin
2011-02-25 11:20     ` Macpaul Lin
2011-03-21 21:54   ` Wolfgang Denk

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=4D3856DC.10605@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=u-boot@lists.denx.de \
    /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 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.