Skip to content

Commit 441c793

Browse files
Shan Weidavem330
authored andcommitted
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>
1 parent 6997e61 commit 441c793

10 files changed

Lines changed: 2 additions & 12 deletions

File tree

‎net/9p/trans_rdma.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
* safely advertise a maxsize
6060
* of 64k */
6161

62-
#define P9_RDMA_MAX_SGE (P9_RDMA_MAXSIZE >> PAGE_SHIFT)
6362
/**
6463
* struct p9_trans_rdma - RDMA transport instance
6564
*

‎net/caif/cfcnfg.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@
2323
#include <asm/atomic.h>
2424

2525
#define MAX_PHY_LAYERS 7
26-
#define PHY_NAME_LEN 20
2726

2827
#define container_obj(layr) container_of(layr, struct cfcnfg, layer)
29-
#define RFM_FRAGMENT_SIZE 4030
3028

3129
/* Information about CAIF physical interfaces held by Config Module in order
3230
* to manage physical interfaces

‎net/caif/cfdgml.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#define DGM_CMD_BIT 0x80
1919
#define DGM_FLOW_OFF 0x81
2020
#define DGM_FLOW_ON 0x80
21-
#define DGM_CTRL_PKT_SIZE 1
2221
#define DGM_MTU 1500
2322

2423
static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt);

‎net/caif/cfserl.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ struct cfserl {
2525
spinlock_t sync;
2626
bool usestx;
2727
};
28-
#define STXLEN(layr) (layr->usestx ? 1 : 0)
2928

3029
static int cfserl_receive(struct cflayer *layr, struct cfpkt *pkt);
3130
static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt);

‎net/caif/cfutill.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define UTIL_REMOTE_SHUTDOWN 0x82
2121
#define UTIL_FLOW_OFF 0x81
2222
#define UTIL_FLOW_ON 0x80
23-
#define UTIL_CTRL_PKT_SIZE 1
23+
2424
static int cfutill_receive(struct cflayer *layr, struct cfpkt *pkt);
2525
static int cfutill_transmit(struct cflayer *layr, struct cfpkt *pkt);
2626

‎net/caif/cfveil.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define VEI_FLOW_OFF 0x81
1818
#define VEI_FLOW_ON 0x80
1919
#define VEI_SET_PIN 0x82
20-
#define VEI_CTRL_PKT_SIZE 1
20+
2121
#define container_obj(layr) container_of(layr, struct cfsrvl, layer)
2222

2323
static int cfvei_receive(struct cflayer *layr, struct cfpkt *pkt);

‎net/decnet/dn_table.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ struct dn_hash
5959
};
6060

6161
#define dz_key_0(key) ((key).datum = 0)
62-
#define dz_prefix(key,dz) ((key).datum)
6362

6463
#define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\
6564
for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++)

‎net/packet/af_packet.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ struct packet_mreq_max {
164164
static int packet_set_ring(struct sock *sk, struct tpacket_req *req,
165165
int closing, int tx_ring);
166166

167-
#define PGV_FROM_VMALLOC 1
168167
struct pgv {
169168
char *buffer;
170169
};

‎net/rds/rds.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ rdsdebug(char *fmt, ...)
5050
#define RDS_FRAG_SIZE ((unsigned int)(1 << RDS_FRAG_SHIFT))
5151

5252
#define RDS_CONG_MAP_BYTES (65536 / 8)
53-
#define RDS_CONG_MAP_LONGS (RDS_CONG_MAP_BYTES / sizeof(unsigned long))
5453
#define RDS_CONG_MAP_PAGES (PAGE_ALIGN(RDS_CONG_MAP_BYTES) / PAGE_SIZE)
5554
#define RDS_CONG_MAP_PAGE_BITS (PAGE_SIZE * 8)
5655

‎net/wanrouter/wanmain.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@
5959
#include <asm/uaccess.h> /* copy_to/from_user */
6060
#include <linux/init.h> /* __initfunc et al. */
6161

62-
#define KMEM_SAFETYZONE 8
63-
6462
#define DEV_TO_SLAVE(dev) (*((struct net_device **)netdev_priv(dev)))
6563

6664
/*

0 commit comments

Comments
 (0)