aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShan Wei <shanwei@cn.fujitsu.com>2011-01-13 17:19:52 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-20 02:20:04 -0500
commit441c793a56502638d45d5da2195056d686147370 (patch)
treedf9860150ce675a2f05e657f2ccad572eced7a66
parent6997e618910b902081a5123f228aac620faa899b (diff)
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: Shan Wei <shanwei@cn.fujitsu.com> Acked-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/9p/trans_rdma.c1
-rw-r--r--net/caif/cfcnfg.c2
-rw-r--r--net/caif/cfdgml.c1
-rw-r--r--net/caif/cfserl.c1
-rw-r--r--net/caif/cfutill.c2
-rw-r--r--net/caif/cfveil.c2
-rw-r--r--net/decnet/dn_table.c1
-rw-r--r--net/packet/af_packet.c1
-rw-r--r--net/rds/rds.h1
-rw-r--r--net/wanrouter/wanmain.c2
10 files changed, 2 insertions, 12 deletions
diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c
index 17c5ba7551a5..29a54ccd213d 100644
--- a/net/9p/trans_rdma.c
+++ b/net/9p/trans_rdma.c
@@ -59,7 +59,6 @@
59 * safely advertise a maxsize 59 * safely advertise a maxsize
60 * of 64k */ 60 * of 64k */
61 61
62#define P9_RDMA_MAX_SGE (P9_RDMA_MAXSIZE >> PAGE_SHIFT)
63/** 62/**
64 * struct p9_trans_rdma - RDMA transport instance 63 * struct p9_trans_rdma - RDMA transport instance
65 * 64 *
diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c
index c665de778b60..f1f98d967d8a 100644
--- a/net/caif/cfcnfg.c
+++ b/net/caif/cfcnfg.c
@@ -23,10 +23,8 @@
23#include <asm/atomic.h> 23#include <asm/atomic.h>
24 24
25#define MAX_PHY_LAYERS 7 25#define MAX_PHY_LAYERS 7
26#define PHY_NAME_LEN 20
27 26
28#define container_obj(layr) container_of(layr, struct cfcnfg, layer) 27#define container_obj(layr) container_of(layr, struct cfcnfg, layer)
29#define RFM_FRAGMENT_SIZE 4030
30 28
31/* Information about CAIF physical interfaces held by Config Module in order 29/* Information about CAIF physical interfaces held by Config Module in order
32 * to manage physical interfaces 30 * to manage physical interfaces
diff --git a/net/caif/cfdgml.c b/net/caif/cfdgml.c
index d3ed264ad6c4..27dab26ad3b8 100644
--- a/net/caif/cfdgml.c
+++ b/net/caif/cfdgml.c
@@ -18,7 +18,6 @@
18#define DGM_CMD_BIT 0x80 18#define DGM_CMD_BIT 0x80
19#define DGM_FLOW_OFF 0x81 19#define DGM_FLOW_OFF 0x81
20#define DGM_FLOW_ON 0x80 20#define DGM_FLOW_ON 0x80
21#define DGM_CTRL_PKT_SIZE 1
22#define DGM_MTU 1500 21#define DGM_MTU 1500
23 22
24static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt); 23static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt);
diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c
index 9297f7dea9d8..8303fe3ebf89 100644
--- a/net/caif/cfserl.c
+++ b/net/caif/cfserl.c
@@ -25,7 +25,6 @@ struct cfserl {
25 spinlock_t sync; 25 spinlock_t sync;
26 bool usestx; 26 bool usestx;
27}; 27};
28#define STXLEN(layr) (layr->usestx ? 1 : 0)
29 28
30static int cfserl_receive(struct cflayer *layr, struct cfpkt *pkt); 29static int cfserl_receive(struct cflayer *layr, struct cfpkt *pkt);
31static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt); 30static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt);
diff --git a/net/caif/cfutill.c b/net/caif/cfutill.c
index efad410e4c82..315c0d601368 100644
--- a/net/caif/cfutill.c
+++ b/net/caif/cfutill.c
@@ -20,7 +20,7 @@
20#define UTIL_REMOTE_SHUTDOWN 0x82 20#define UTIL_REMOTE_SHUTDOWN 0x82
21#define UTIL_FLOW_OFF 0x81 21#define UTIL_FLOW_OFF 0x81
22#define UTIL_FLOW_ON 0x80 22#define UTIL_FLOW_ON 0x80
23#define UTIL_CTRL_PKT_SIZE 1 23
24static int cfutill_receive(struct cflayer *layr, struct cfpkt *pkt); 24static int cfutill_receive(struct cflayer *layr, struct cfpkt *pkt);
25static int cfutill_transmit(struct cflayer *layr, struct cfpkt *pkt); 25static int cfutill_transmit(struct cflayer *layr, struct cfpkt *pkt);
26 26
diff --git a/net/caif/cfveil.c b/net/caif/cfveil.c
index 3b425b189a99..c3b1dec4acf6 100644
--- a/net/caif/cfveil.c
+++ b/net/caif/cfveil.c
@@ -17,7 +17,7 @@
17#define VEI_FLOW_OFF 0x81 17#define VEI_FLOW_OFF 0x81
18#define VEI_FLOW_ON 0x80 18#define VEI_FLOW_ON 0x80
19#define VEI_SET_PIN 0x82 19#define VEI_SET_PIN 0x82
20#define VEI_CTRL_PKT_SIZE 1 20
21#define container_obj(layr) container_of(layr, struct cfsrvl, layer) 21#define container_obj(layr) container_of(layr, struct cfsrvl, layer)
22 22
23static int cfvei_receive(struct cflayer *layr, struct cfpkt *pkt); 23static int cfvei_receive(struct cflayer *layr, struct cfpkt *pkt);
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c
index f2abd3755690..b66600b3f4b5 100644
--- a/net/decnet/dn_table.c
+++ b/net/decnet/dn_table.c
@@ -59,7 +59,6 @@ struct dn_hash
59}; 59};
60 60
61#define dz_key_0(key) ((key).datum = 0) 61#define dz_key_0(key) ((key).datum = 0)
62#define dz_prefix(key,dz) ((key).datum)
63 62
64#define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\ 63#define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\
65 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) 64 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index c3fc7b70a879..c60649ec1193 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -164,7 +164,6 @@ struct packet_mreq_max {
164static int packet_set_ring(struct sock *sk, struct tpacket_req *req, 164static int packet_set_ring(struct sock *sk, struct tpacket_req *req,
165 int closing, int tx_ring); 165 int closing, int tx_ring);
166 166
167#define PGV_FROM_VMALLOC 1
168struct pgv { 167struct pgv {
169 char *buffer; 168 char *buffer;
170}; 169};
diff --git a/net/rds/rds.h b/net/rds/rds.h
index 9542449c0720..da8adac2bf06 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -50,7 +50,6 @@ rdsdebug(char *fmt, ...)
50#define RDS_FRAG_SIZE ((unsigned int)(1 << RDS_FRAG_SHIFT)) 50#define RDS_FRAG_SIZE ((unsigned int)(1 << RDS_FRAG_SHIFT))
51 51
52#define RDS_CONG_MAP_BYTES (65536 / 8) 52#define RDS_CONG_MAP_BYTES (65536 / 8)
53#define RDS_CONG_MAP_LONGS (RDS_CONG_MAP_BYTES / sizeof(unsigned long))
54#define RDS_CONG_MAP_PAGES (PAGE_ALIGN(RDS_CONG_MAP_BYTES) / PAGE_SIZE) 53#define RDS_CONG_MAP_PAGES (PAGE_ALIGN(RDS_CONG_MAP_BYTES) / PAGE_SIZE)
55#define RDS_CONG_MAP_PAGE_BITS (PAGE_SIZE * 8) 54#define RDS_CONG_MAP_PAGE_BITS (PAGE_SIZE * 8)
56 55
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
index 74944a2dd436..788a12c1eb5d 100644
--- a/net/wanrouter/wanmain.c
+++ b/net/wanrouter/wanmain.c
@@ -59,8 +59,6 @@
59#include <asm/uaccess.h> /* copy_to/from_user */ 59#include <asm/uaccess.h> /* copy_to/from_user */
60#include <linux/init.h> /* __initfunc et al. */ 60#include <linux/init.h> /* __initfunc et al. */
61 61
62#define KMEM_SAFETYZONE 8
63
64#define DEV_TO_SLAVE(dev) (*((struct net_device **)netdev_priv(dev))) 62#define DEV_TO_SLAVE(dev) (*((struct net_device **)netdev_priv(dev)))
65 63
66/* 64/*