Re: [PATCH RFC] net: add helper eth_set_protocol

2020-10-11 Thread Heiner Kallweit
On 12.10.2020 00:13, Jakub Kicinski wrote: > On Tue, 6 Oct 2020 22:10:00 +0200 Heiner Kallweit wrote: >> In all cases I've seen eth_type_trans() is used as in the new helper. >> Biggest benefit is improved readability when replacing statements like >> the following: >> desc->skb->protocol = eth_typ

Re: [PATCH RFC] net: add helper eth_set_protocol

2020-10-11 Thread Jakub Kicinski
On Tue, 6 Oct 2020 22:10:00 +0200 Heiner Kallweit wrote: > In all cases I've seen eth_type_trans() is used as in the new helper. > Biggest benefit is improved readability when replacing statements like > the following: > desc->skb->protocol = eth_type_trans(desc->skb, priv->dev); > > Coccinelle te

[PATCH RFC] net: add helper eth_set_protocol

2020-10-06 Thread Heiner Kallweit
In all cases I've seen eth_type_trans() is used as in the new helper. Biggest benefit is improved readability when replacing statements like the following: desc->skb->protocol = eth_type_trans(desc->skb, priv->dev); Coccinelle tells me that using the new helper tree-wide would touch 313 files. The