aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_netlink.c
diff options
context:
space:
mode:
authorHong zhi guo <honkiko@gmail.com>2013-03-28 02:21:22 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-28 14:41:19 -0400
commitc60ee67f45b3aa5dfbfe39bfe0b9e65459dc5ec7 (patch)
tree24e28270f9ba9ad14a4b6c06662c7b524227ce47 /net/bridge/br_netlink.c
parentace58010c458e54865d39bc522d0d84dadba2182 (diff)
bridge: remove unused variable ifm
Signed-off-by: Hong Zhiguo <honkiko@gmail.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_netlink.c')
-rw-r--r--net/bridge/br_netlink.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index b96e02e31bad..8e3abf564798 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -352,17 +352,14 @@ static int br_setport(struct net_bridge_port *p, struct nlattr *tb[])
352/* Change state and parameters on port. */ 352/* Change state and parameters on port. */
353int br_setlink(struct net_device *dev, struct nlmsghdr *nlh) 353int br_setlink(struct net_device *dev, struct nlmsghdr *nlh)
354{ 354{
355 struct ifinfomsg *ifm;
356 struct nlattr *protinfo; 355 struct nlattr *protinfo;
357 struct nlattr *afspec; 356 struct nlattr *afspec;
358 struct net_bridge_port *p; 357 struct net_bridge_port *p;
359 struct nlattr *tb[IFLA_BRPORT_MAX + 1]; 358 struct nlattr *tb[IFLA_BRPORT_MAX + 1];
360 int err = 0; 359 int err = 0;
361 360
362 ifm = nlmsg_data(nlh); 361 protinfo = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_PROTINFO);
363 362 afspec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
364 protinfo = nlmsg_find_attr(nlh, sizeof(*ifm), IFLA_PROTINFO);
365 afspec = nlmsg_find_attr(nlh, sizeof(*ifm), IFLA_AF_SPEC);
366 if (!protinfo && !afspec) 363 if (!protinfo && !afspec)
367 return 0; 364 return 0;
368 365
@@ -411,14 +408,11 @@ out:
411/* Delete port information */ 408/* Delete port information */
412int br_dellink(struct net_device *dev, struct nlmsghdr *nlh) 409int br_dellink(struct net_device *dev, struct nlmsghdr *nlh)
413{ 410{
414 struct ifinfomsg *ifm;
415 struct nlattr *afspec; 411 struct nlattr *afspec;
416 struct net_bridge_port *p; 412 struct net_bridge_port *p;
417 int err; 413 int err;
418 414
419 ifm = nlmsg_data(nlh); 415 afspec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
420
421 afspec = nlmsg_find_attr(nlh, sizeof(*ifm), IFLA_AF_SPEC);
422 if (!afspec) 416 if (!afspec)
423 return 0; 417 return 0;
424 418