[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100602.070233.37574714.davem@davemloft.net>
Date: Wed, 02 Jun 2010 07:02:33 -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] netdev:bfin_mac: reclaim and free tx skb as soon as
possible after transfer
From: sonic zhang <sonic.adi@...il.com>
Date: Tue, 1 Jun 2010 17:19:34 +0800
> @@ -1485,6 +1506,10 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
> ndev->netdev_ops = &bfin_mac_netdev_ops;
> ndev->ethtool_ops = &bfin_mac_ethtool_ops;
>
> + init_timer(&lp->tx_reclaim_timer);
> + lp->tx_reclaim_timer.data = (unsigned long)(lp);
Putting parenthesis around "lp" is excessive, please don't do this.
> + lp->tx_reclaim_timer.function = (void *)tx_reclaim_skb;
> +
> spin_lock_init(&lp->lock);
Do not cast the function pointer to "void *" like this, it's ugly and entirely
not necessary.
Instead have a wrapper function that uses the correct types as specified
for timer functions, that calls the existing function.
--
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