Re: [PATCH] net: Abstract features usage.
From: Stephen Hemminger <hidden>
Date: 2011-05-24 21:29:31
On Tue, 24 May 2011 11:52:42 -0700 Mahesh Bandewar [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Define macros to set/clear/test bits for feature set usage. This will eliminate the direct use of these fields and enable future ease in managing these fields. Signed-off-by: Mahesh Bandewar <redacted> --- include/linux/netdev_features.h | 137 +++++++++++++++++++++++++++++++++++++++ include/linux/netdevice.h | 35 ++--------- 2 files changed, 142 insertions(+), 30 deletions(-) create mode 100644 include/linux/netdev_features.hdiff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h new file mode 100644 index 0000000..97bf8c4 --- /dev/null +++ b/include/linux/netdev_features.h@@ -0,0 +1,137 @@ +#ifndef _NETDEV_FEATURES_H +#define _NETDEV_FEATURES_H + +/* Forward declarations */ +struct net_device; + +typedef unsigned long *nd_feature_t
typedef'ing a pointer is strongly discouraged by kernel coding style. You need to use another way such as open coding it. --