Skip to content

Commit 89e4950

Browse files
Florian Westphaldavem330
Florian Westphal
authored andcommitted
dsa: remove unused net_device arg from handlers
compile tested only, but saw no warnings/errors with allmodconfig build. Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d1ef551 commit 89e4950

File tree

10 files changed

+12
-21
lines changed

10 files changed

+12
-21
lines changed

include/net/dsa.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ struct packet_type;
104104
struct dsa_device_ops {
105105
struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
106106
struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
107-
struct packet_type *pt,
108-
struct net_device *orig_dev);
107+
struct packet_type *pt);
109108
int (*flow_dissect)(const struct sk_buff *skb, __be16 *proto,
110109
int *offset);
111110
};
@@ -134,8 +133,7 @@ struct dsa_switch_tree {
134133
/* Copy of tag_ops->rcv for faster access in hot path */
135134
struct sk_buff * (*rcv)(struct sk_buff *skb,
136135
struct net_device *dev,
137-
struct packet_type *pt,
138-
struct net_device *orig_dev);
136+
struct packet_type *pt);
139137

140138
/*
141139
* The switch port to which the CPU is attached.

net/dsa/dsa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ struct net_device *dsa_dev_to_net_device(struct device *dev)
186186
EXPORT_SYMBOL_GPL(dsa_dev_to_net_device);
187187

188188
static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev,
189-
struct packet_type *pt, struct net_device *orig_dev)
189+
struct packet_type *pt, struct net_device *unused)
190190
{
191191
struct dsa_switch_tree *dst = dev->dsa_ptr;
192192
struct sk_buff *nskb = NULL;
@@ -202,7 +202,7 @@ static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev,
202202
if (!skb)
203203
return 0;
204204

205-
nskb = dst->rcv(skb, dev, pt, orig_dev);
205+
nskb = dst->rcv(skb, dev, pt);
206206
if (!nskb) {
207207
kfree_skb(skb);
208208
return 0;

net/dsa/tag_brcm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb, struct net_device *dev
8989
}
9090

9191
static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
92-
struct packet_type *pt,
93-
struct net_device *orig_dev)
92+
struct packet_type *pt)
9493
{
9594
struct dsa_switch_tree *dst = dev->dsa_ptr;
9695
struct dsa_port *cpu_dp = dsa_get_cpu_port(dst);

net/dsa/tag_dsa.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ static struct sk_buff *dsa_xmit(struct sk_buff *skb, struct net_device *dev)
6565
}
6666

6767
static struct sk_buff *dsa_rcv(struct sk_buff *skb, struct net_device *dev,
68-
struct packet_type *pt,
69-
struct net_device *orig_dev)
68+
struct packet_type *pt)
7069
{
7170
struct dsa_switch_tree *dst = dev->dsa_ptr;
7271
struct dsa_switch *ds;

net/dsa/tag_edsa.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev)
7878
}
7979

8080
static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev,
81-
struct packet_type *pt,
82-
struct net_device *orig_dev)
81+
struct packet_type *pt)
8382
{
8483
struct dsa_switch_tree *dst = dev->dsa_ptr;
8584
struct dsa_switch *ds;

net/dsa/tag_ksz.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev)
7676
}
7777

7878
static struct sk_buff *ksz_rcv(struct sk_buff *skb, struct net_device *dev,
79-
struct packet_type *pt,
80-
struct net_device *orig_dev)
79+
struct packet_type *pt)
8180
{
8281
struct dsa_switch_tree *dst = dev->dsa_ptr;
8382
struct dsa_port *cpu_dp = dsa_get_cpu_port(dst);

net/dsa/tag_lan9303.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net_device *dev)
6868
}
6969

7070
static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev,
71-
struct packet_type *pt, struct net_device *orig_dev)
71+
struct packet_type *pt)
7272
{
7373
u16 *lan9303_tag;
7474
struct dsa_switch_tree *dst = dev->dsa_ptr;

net/dsa/tag_mtk.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb,
4444
}
4545

4646
static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev,
47-
struct packet_type *pt,
48-
struct net_device *orig_dev)
47+
struct packet_type *pt)
4948
{
5049
struct dsa_switch_tree *dst = dev->dsa_ptr;
5150
struct dsa_switch *ds;

net/dsa/tag_qca.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
6363
}
6464

6565
static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
66-
struct packet_type *pt,
67-
struct net_device *orig_dev)
66+
struct packet_type *pt)
6867
{
6968
struct dsa_switch_tree *dst = dev->dsa_ptr;
7069
struct dsa_port *cpu_dp = dsa_get_cpu_port(dst);

net/dsa/tag_trailer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ static struct sk_buff *trailer_xmit(struct sk_buff *skb, struct net_device *dev)
5656
}
5757

5858
static struct sk_buff *trailer_rcv(struct sk_buff *skb, struct net_device *dev,
59-
struct packet_type *pt,
60-
struct net_device *orig_dev)
59+
struct packet_type *pt)
6160
{
6261
struct dsa_switch_tree *dst = dev->dsa_ptr;
6362
struct dsa_port *cpu_dp = dsa_get_cpu_port(dst);

0 commit comments

Comments
 (0)