[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTim3WVTyMf2RvKRvyJn90sAyw1-ZShTfvvMlQolJ@mail.gmail.com>
Date: Thu, 3 Jun 2010 11:21:16 +0800
From: Sonic Zhang <sonic.adi@...il.com>
To: David Miller <davem@...emloft.net>
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
On Wed, Jun 2, 2010 at 10:02 PM, David Miller <davem@...emloft.net> wrote:
> 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);
>
OK
> 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.
>
No problem.
Sonic
--
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