Commit c60ee67f authored by Hong zhi guo's avatar Hong zhi guo Committed by David S. Miller

bridge: remove unused variable ifm

Signed-off-by: default avatarHong Zhiguo <honkiko@gmail.com>
Acked-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ace58010
...@@ -352,17 +352,14 @@ static int br_setport(struct net_bridge_port *p, struct nlattr *tb[]) ...@@ -352,17 +352,14 @@ static int br_setport(struct net_bridge_port *p, struct nlattr *tb[])
/* Change state and parameters on port. */ /* Change state and parameters on port. */
int br_setlink(struct net_device *dev, struct nlmsghdr *nlh) int br_setlink(struct net_device *dev, struct nlmsghdr *nlh)
{ {
struct ifinfomsg *ifm;
struct nlattr *protinfo; struct nlattr *protinfo;
struct nlattr *afspec; struct nlattr *afspec;
struct net_bridge_port *p; struct net_bridge_port *p;
struct nlattr *tb[IFLA_BRPORT_MAX + 1]; struct nlattr *tb[IFLA_BRPORT_MAX + 1];
int err = 0; int err = 0;
ifm = nlmsg_data(nlh); protinfo = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_PROTINFO);
afspec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
protinfo = nlmsg_find_attr(nlh, sizeof(*ifm), IFLA_PROTINFO);
afspec = nlmsg_find_attr(nlh, sizeof(*ifm), IFLA_AF_SPEC);
if (!protinfo && !afspec) if (!protinfo && !afspec)
return 0; return 0;
...@@ -411,14 +408,11 @@ int br_setlink(struct net_device *dev, struct nlmsghdr *nlh) ...@@ -411,14 +408,11 @@ int br_setlink(struct net_device *dev, struct nlmsghdr *nlh)
/* Delete port information */ /* Delete port information */
int br_dellink(struct net_device *dev, struct nlmsghdr *nlh) int br_dellink(struct net_device *dev, struct nlmsghdr *nlh)
{ {
struct ifinfomsg *ifm;
struct nlattr *afspec; struct nlattr *afspec;
struct net_bridge_port *p; struct net_bridge_port *p;
int err; int err;
ifm = nlmsg_data(nlh); afspec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
afspec = nlmsg_find_attr(nlh, sizeof(*ifm), IFLA_AF_SPEC);
if (!afspec) if (!afspec)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment