[tables] Incorporate table data type information into table definition
Eliminate the potential for mismatches between table names and the table entry data type by incorporating the data type into the definition of the table, rather than specifying it explicitly in each table accessor method.
This commit is contained in:
@@ -280,16 +280,16 @@ struct net_device {
|
||||
#define NETDEV_LINK_UP 0x0002
|
||||
|
||||
/** Link-layer protocol table */
|
||||
#define LL_PROTOCOLS "ll_protocols"
|
||||
#define LL_PROTOCOLS __table ( struct ll_protocol, "ll_protocols" )
|
||||
|
||||
/** Declare a link-layer protocol */
|
||||
#define __ll_protocol __table ( struct ll_protocol, LL_PROTOCOLS, 01 )
|
||||
#define __ll_protocol __table_entry ( LL_PROTOCOLS, 01 )
|
||||
|
||||
/** Network-layer protocol table */
|
||||
#define NET_PROTOCOLS "net_protocols"
|
||||
#define NET_PROTOCOLS __table ( struct net_protocol, "net_protocols" )
|
||||
|
||||
/** Declare a network-layer protocol */
|
||||
#define __net_protocol __table ( struct net_protocol, NET_PROTOCOLS, 01 )
|
||||
#define __net_protocol __table_entry ( NET_PROTOCOLS, 01 )
|
||||
|
||||
extern struct list_head net_devices;
|
||||
extern struct net_device_operations null_netdev_operations;
|
||||
|
||||
Reference in New Issue
Block a user