From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 28 Mar 2013 10:03:44 -0700 From: Stephen Hemminger Message-ID: <20130328100344.70c78134@nehalam.linuxnetplumber.net> In-Reply-To: <1364487682-5839-1-git-send-email-honkiko@gmail.com> References: <1364487682-5839-1-git-send-email-honkiko@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] [PATCH net-next] bridge: remove unused variable ifm List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hong Zhiguo Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org, davem@davemloft.net On Fri, 29 Mar 2013 00:21:22 +0800 Hong Zhiguo wrote: > Signed-off-by: Hong Zhiguo > --- > net/bridge/br_netlink.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c > index b96e02e..8e3abf5 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[]) > /* 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; > Acked-by: Stephen Hemminger