[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3baf861-b319-af95-8e0e-2c0cae1f071b@cogentembedded.com>
Date: Wed, 5 Oct 2016 15:57:57 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Nelson Chang <nelson.chang@...iatek.com>, john@...ozen.org,
davem@...emloft.net
Cc: nbd@...nwrt.org, netdev@...r.kernel.org,
linux-mediatek@...ts.infradead.org, nelsonch.tw@...il.com
Subject: Re: [PATCH net-next v2 2/3] net: ethernet: mediatek: get hw lro
capability by the chip id instead of by the dtsi
On 10/05/2016 03:46 PM, Nelson Chang wrote:
>> +static bool mtk_is_hwlro_supported(struct mtk_eth *eth) {
>> + if (eth->chip_id == MT7623_ETH)
>> + return true;
>> + else
>> + return false;
>
> return eth->chip_id == MT7623_ETH;
>
> => Since there will be more chips support hw lro in the future, keep the
> original codes to have the scalability like this:
> if (eth->chip_id == MTxxxx_ETH ||
> eth->chip_id == MTyyyy_ETH ||
> ....)
> return true;
Then use *switch*, not *if*.
> Nelson
MBR, Sergei
Powered by blists - more mailing lists