提交 441c793a 编写于 作者: S Shan Wei 提交者: David S. Miller

net: cleanup unused macros in net directory

Clean up some unused macros in net/*.
1. be left for code change. e.g. PGV_FROM_VMALLOC, PGV_FROM_VMALLOC, KMEM_SAFETYZONE.
2. never be used since introduced to kernel.
   e.g. P9_RDMA_MAX_SGE, UTIL_CTRL_PKT_SIZE.
Signed-off-by: NShan Wei <shanwei@cn.fujitsu.com>
Acked-by: NSjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6997e618
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
* safely advertise a maxsize * safely advertise a maxsize
* of 64k */ * of 64k */
#define P9_RDMA_MAX_SGE (P9_RDMA_MAXSIZE >> PAGE_SHIFT)
/** /**
* struct p9_trans_rdma - RDMA transport instance * struct p9_trans_rdma - RDMA transport instance
* *
......
...@@ -23,10 +23,8 @@ ...@@ -23,10 +23,8 @@
#include <asm/atomic.h> #include <asm/atomic.h>
#define MAX_PHY_LAYERS 7 #define MAX_PHY_LAYERS 7
#define PHY_NAME_LEN 20
#define container_obj(layr) container_of(layr, struct cfcnfg, layer) #define container_obj(layr) container_of(layr, struct cfcnfg, layer)
#define RFM_FRAGMENT_SIZE 4030
/* Information about CAIF physical interfaces held by Config Module in order /* Information about CAIF physical interfaces held by Config Module in order
* to manage physical interfaces * to manage physical interfaces
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#define DGM_CMD_BIT 0x80 #define DGM_CMD_BIT 0x80
#define DGM_FLOW_OFF 0x81 #define DGM_FLOW_OFF 0x81
#define DGM_FLOW_ON 0x80 #define DGM_FLOW_ON 0x80
#define DGM_CTRL_PKT_SIZE 1
#define DGM_MTU 1500 #define DGM_MTU 1500
static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt); static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt);
......
...@@ -25,7 +25,6 @@ struct cfserl { ...@@ -25,7 +25,6 @@ struct cfserl {
spinlock_t sync; spinlock_t sync;
bool usestx; bool usestx;
}; };
#define STXLEN(layr) (layr->usestx ? 1 : 0)
static int cfserl_receive(struct cflayer *layr, struct cfpkt *pkt); static int cfserl_receive(struct cflayer *layr, struct cfpkt *pkt);
static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt); static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#define UTIL_REMOTE_SHUTDOWN 0x82 #define UTIL_REMOTE_SHUTDOWN 0x82
#define UTIL_FLOW_OFF 0x81 #define UTIL_FLOW_OFF 0x81
#define UTIL_FLOW_ON 0x80 #define UTIL_FLOW_ON 0x80
#define UTIL_CTRL_PKT_SIZE 1
static int cfutill_receive(struct cflayer *layr, struct cfpkt *pkt); static int cfutill_receive(struct cflayer *layr, struct cfpkt *pkt);
static int cfutill_transmit(struct cflayer *layr, struct cfpkt *pkt); static int cfutill_transmit(struct cflayer *layr, struct cfpkt *pkt);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#define VEI_FLOW_OFF 0x81 #define VEI_FLOW_OFF 0x81
#define VEI_FLOW_ON 0x80 #define VEI_FLOW_ON 0x80
#define VEI_SET_PIN 0x82 #define VEI_SET_PIN 0x82
#define VEI_CTRL_PKT_SIZE 1
#define container_obj(layr) container_of(layr, struct cfsrvl, layer) #define container_obj(layr) container_of(layr, struct cfsrvl, layer)
static int cfvei_receive(struct cflayer *layr, struct cfpkt *pkt); static int cfvei_receive(struct cflayer *layr, struct cfpkt *pkt);
......
...@@ -59,7 +59,6 @@ struct dn_hash ...@@ -59,7 +59,6 @@ struct dn_hash
}; };
#define dz_key_0(key) ((key).datum = 0) #define dz_key_0(key) ((key).datum = 0)
#define dz_prefix(key,dz) ((key).datum)
#define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\ #define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\
for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++)
......
...@@ -164,7 +164,6 @@ struct packet_mreq_max { ...@@ -164,7 +164,6 @@ struct packet_mreq_max {
static int packet_set_ring(struct sock *sk, struct tpacket_req *req, static int packet_set_ring(struct sock *sk, struct tpacket_req *req,
int closing, int tx_ring); int closing, int tx_ring);
#define PGV_FROM_VMALLOC 1
struct pgv { struct pgv {
char *buffer; char *buffer;
}; };
......
...@@ -50,7 +50,6 @@ rdsdebug(char *fmt, ...) ...@@ -50,7 +50,6 @@ rdsdebug(char *fmt, ...)
#define RDS_FRAG_SIZE ((unsigned int)(1 << RDS_FRAG_SHIFT)) #define RDS_FRAG_SIZE ((unsigned int)(1 << RDS_FRAG_SHIFT))
#define RDS_CONG_MAP_BYTES (65536 / 8) #define RDS_CONG_MAP_BYTES (65536 / 8)
#define RDS_CONG_MAP_LONGS (RDS_CONG_MAP_BYTES / sizeof(unsigned long))
#define RDS_CONG_MAP_PAGES (PAGE_ALIGN(RDS_CONG_MAP_BYTES) / PAGE_SIZE) #define RDS_CONG_MAP_PAGES (PAGE_ALIGN(RDS_CONG_MAP_BYTES) / PAGE_SIZE)
#define RDS_CONG_MAP_PAGE_BITS (PAGE_SIZE * 8) #define RDS_CONG_MAP_PAGE_BITS (PAGE_SIZE * 8)
......
...@@ -59,8 +59,6 @@ ...@@ -59,8 +59,6 @@
#include <asm/uaccess.h> /* copy_to/from_user */ #include <asm/uaccess.h> /* copy_to/from_user */
#include <linux/init.h> /* __initfunc et al. */ #include <linux/init.h> /* __initfunc et al. */
#define KMEM_SAFETYZONE 8
#define DEV_TO_SLAVE(dev) (*((struct net_device **)netdev_priv(dev))) #define DEV_TO_SLAVE(dev) (*((struct net_device **)netdev_priv(dev)))
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册