[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100607.212238.209978119.davem@davemloft.net>
Date: Mon, 07 Jun 2010 21:22:38 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: sonic.adi@...il.com
Cc: netdev@...r.kernel.org, uclinux-dist-devel@...ckfin.uclinux.org
Subject: Re: [PATCH v3] netdev:bfin_mac: reclaim and free tx skb as soon as
possible after transfer
From: sonic zhang <sonic.adi@...il.com>
Date: Mon, 7 Jun 2010 18:38:24 +0800
>
> + if (timer_pending(&lp->tx_reclaim_timer))
> + del_timer(&(lp->tx_reclaim_timer));
> +
Please remove the excess parenthesis around lp->tx_reclaim_timer being
passed to del_timer().
Also, you can unconditionally call del_timer(). If the timer isn't running
the call won't do anything.
But you have to do something to make sure you don't race with the code that
enables the timer, f.e. what keeps the timer from being scheduled right
after you make this del_timer() call?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists