Thread (29 messages) 29 messages, 7 authors, 2011-06-09

Re: [PATCHv2] net: Define enum for the bits used in features.

From: Hagen Paul Pfeifer <hidden>
Date: 2011-05-25 07:58:52

On Tue, 24 May 2011 18:56:07 -0700, Mahesh Bandewar wrote:
Little bit cleanup by defining enum for all bits used. Also use those
enum
values to redefine flags.


Where is the advantage? Now I need to add 2 lines at two different places.



#define NETIF_F_IP_CSUM		BIT2FLAG(IP_CSUM_BIT)



Confuses me more compared to a simple 



#define NETIF_F_IP_CSUM		(1 << 2)





The enum netdev_features namespace is not really unique (e.g.

RESERVED16_BIT).





For me the modifications are harder to understand, my tools are confused

and I see no real advantage, only more indirection introduced.





Hagen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help