aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_device.c15
-rw-r--r--net/bridge/br_if.c2
-rw-r--r--net/bridge/br_private.h4
3 files changed, 10 insertions, 11 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index f2a08477e0f5..0dd01a05bd59 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -218,16 +218,16 @@ static void br_netpoll_cleanup(struct net_device *dev)
218 br_netpoll_disable(p); 218 br_netpoll_disable(p);
219} 219}
220 220
221static int __br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp) 221static int __br_netpoll_enable(struct net_bridge_port *p)
222{ 222{
223 struct netpoll *np; 223 struct netpoll *np;
224 int err; 224 int err;
225 225
226 np = kzalloc(sizeof(*p->np), gfp); 226 np = kzalloc(sizeof(*p->np), GFP_KERNEL);
227 if (!np) 227 if (!np)
228 return -ENOMEM; 228 return -ENOMEM;
229 229
230 err = __netpoll_setup(np, p->dev, gfp); 230 err = __netpoll_setup(np, p->dev);
231 if (err) { 231 if (err) {
232 kfree(np); 232 kfree(np);
233 return err; 233 return err;
@@ -237,16 +237,15 @@ static int __br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp)
237 return err; 237 return err;
238} 238}
239 239
240int br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp) 240int br_netpoll_enable(struct net_bridge_port *p)
241{ 241{
242 if (!p->br->dev->npinfo) 242 if (!p->br->dev->npinfo)
243 return 0; 243 return 0;
244 244
245 return __br_netpoll_enable(p, gfp); 245 return __br_netpoll_enable(p);
246} 246}
247 247
248static int br_netpoll_setup(struct net_device *dev, struct netpoll_info *ni, 248static int br_netpoll_setup(struct net_device *dev, struct netpoll_info *ni)
249 gfp_t gfp)
250{ 249{
251 struct net_bridge *br = netdev_priv(dev); 250 struct net_bridge *br = netdev_priv(dev);
252 struct net_bridge_port *p; 251 struct net_bridge_port *p;
@@ -255,7 +254,7 @@ static int br_netpoll_setup(struct net_device *dev, struct netpoll_info *ni,
255 list_for_each_entry(p, &br->port_list, list) { 254 list_for_each_entry(p, &br->port_list, list) {
256 if (!p->dev) 255 if (!p->dev)
257 continue; 256 continue;
258 err = __br_netpoll_enable(p, gfp); 257 err = __br_netpoll_enable(p);
259 if (err) 258 if (err)
260 goto fail; 259 goto fail;
261 } 260 }
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 54d207d3a31c..5262b8617eb9 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -366,7 +366,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
366 if (err) 366 if (err)
367 goto err2; 367 goto err2;
368 368
369 err = br_netpoll_enable(p, GFP_KERNEL); 369 err = br_netpoll_enable(p);
370 if (err) 370 if (err)
371 goto err3; 371 goto err3;
372 372
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index e1ca1dc916a4..06811d79f89f 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -349,7 +349,7 @@ static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
349 netpoll_send_skb(np, skb); 349 netpoll_send_skb(np, skb);
350} 350}
351 351
352int br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp); 352int br_netpoll_enable(struct net_bridge_port *p);
353void br_netpoll_disable(struct net_bridge_port *p); 353void br_netpoll_disable(struct net_bridge_port *p);
354#else 354#else
355static inline void br_netpoll_send_skb(const struct net_bridge_port *p, 355static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
@@ -357,7 +357,7 @@ static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
357{ 357{
358} 358}
359 359
360static inline int br_netpoll_enable(struct net_bridge_port *p, gfp_t gfp) 360static inline int br_netpoll_enable(struct net_bridge_port *p)
361{ 361{
362 return 0; 362 return 0;
363} 363}