bridge: remove unused variable ifm
Subsystems (3)
PATCH 1/1 bridge: remove unused variable ifm
Signed-off-by Hong Zhiguo <[email protected]>
--- net/bridge/br_netlink.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
net/bridge/br_netlink.c +3 -9
@@ -352,17 +352,14 @@ static int br_setport(struct net_bridge_port *p, struct nlattr *tb[])/* Change state and parameters on port. */ int br_setlink (struct net_device *dev,struct nlmsghdr *nlh) { -struct ifinfomsg *ifm;struct nlattr *protinfo;struct nlattr *afspec;struct net_bridge_port *p;struct nlattr *tb[IFLA_BRPORT_MAX +1 ];int err =0 ; - ifm =nlmsg_data (nlh); - - protinfo =nlmsg_find_attr (nlh,sizeof (*ifm),IFLA_PROTINFO ); - afspec =nlmsg_find_attr (nlh,sizeof (*ifm),IFLA_AF_SPEC ); + protinfo =nlmsg_find_attr (nlh,sizeof (struct ifinfomsg ),IFLA_PROTINFO ); + afspec =nlmsg_find_attr (nlh,sizeof (struct ifinfomsg ),IFLA_AF_SPEC );if (!protinfo && !afspec)return 0 ;
@@ -411,14 +408,11 @@ out:/* Delete port information */ int br_dellink (struct net_device *dev,struct nlmsghdr *nlh) { -struct ifinfomsg *ifm;struct nlattr *afspec;struct net_bridge_port *p;int err; - ifm =nlmsg_data (nlh); - - afspec =nlmsg_find_attr (nlh,sizeof (*ifm),IFLA_AF_SPEC ); + afspec =nlmsg_find_attr (nlh,sizeof (struct ifinfomsg ),IFLA_AF_SPEC );if (!afspec)return 0 ;
Signature · 1 line
1.7.10.4
Quoted 35 lines · On Fri, 29 Mar 2013 00:21:22 +0800 Hong Zhiguo <[email protected]> wrote:
Signed-off-by Hong Zhiguo <[email protected]>--- net/bridge/br_netlink.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)net/bridge/br_netlink.c +2
-6@@ -352,17 +352,14 @@ static int br_setport(struct net_bridge_port *p, struct nlattr *tb[])/* Change state and parameters on port. */ int br_setlink (struct net_device *dev,struct nlmsghdr *nlh) { -struct ifinfomsg *ifm;struct nlattr *protinfo;struct nlattr *afspec;struct net_bridge_port *p;struct nlattr *tb[IFLA_BRPORT_MAX +1 ];int err =0 ; - ifm =nlmsg_data (nlh); - - protinfo =nlmsg_find_attr (nlh,sizeof (*ifm),IFLA_PROTINFO ); - afspec =nlmsg_find_attr (nlh,sizeof (*ifm),IFLA_AF_SPEC ); + protinfo =nlmsg_find_attr (nlh,sizeof (struct ifinfomsg ),IFLA_PROTINFO ); + afspec =nlmsg_find_attr (nlh,sizeof (struct ifinfomsg ),IFLA_AF_SPEC );if (!protinfo && !afspec)return 0 ;@@ -411,14 +408,11 @@ out:/* Delete port information */ int br_dellink (struct net_device *dev,struct nlmsghdr *nlh) { -struct ifinfomsg *ifm;struct nlattr *afspec;
net/bridge/br_netlink.c out: · line 418
Quoted 10 lines
net/bridge/br_netlink.c +1
-3struct net_bridge_port *p;int err; - ifm =nlmsg_data (nlh); - - afspec =nlmsg_find_attr (nlh,sizeof (*ifm),IFLA_AF_SPEC ); + afspec =nlmsg_find_attr (nlh,sizeof (struct ifinfomsg ),IFLA_AF_SPEC );if (!afspec)return 0 ;
From: Stephen Hemminger <[email protected]>
Date: Thu, 28 Mar 2013 10:03:44 -0700
Quoted 4 lines
Quoted 1 line · On Fri, 29 Mar 2013 00:21:22 +0800 Hong Zhiguo <[email protected]> wrote:
Signed-off-by Hong Zhiguo <[email protected]>
...
Quoted 1 line
Applied.