public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] bridge: remove unused variable ifm
@ 2013-03-28 16:21 Hong Zhiguo
  2013-03-28 17:03 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Hong Zhiguo @ 2013-03-28 16:21 UTC (permalink / raw)
  To: netdev; +Cc: bridge, davem, stephen

Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
---
 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;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] bridge: remove unused variable ifm
  2013-03-28 16:21 [PATCH net-next] bridge: remove unused variable ifm Hong Zhiguo
@ 2013-03-28 17:03 ` Stephen Hemminger
  2013-03-28 18:41   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2013-03-28 17:03 UTC (permalink / raw)
  To: Hong Zhiguo; +Cc: netdev, bridge, davem

On Fri, 29 Mar 2013 00:21:22 +0800
Hong Zhiguo <honkiko@gmail.com> wrote:

> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
> ---
>  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 <stephen@networkplumber.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] bridge: remove unused variable ifm
  2013-03-28 17:03 ` Stephen Hemminger
@ 2013-03-28 18:41   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2013-03-28 18:41 UTC (permalink / raw)
  To: stephen; +Cc: netdev, bridge, honkiko

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 28 Mar 2013 10:03:44 -0700

> On Fri, 29 Mar 2013 00:21:22 +0800
> Hong Zhiguo <honkiko@gmail.com> wrote:
> 
>> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
 ...
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-28 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-28 16:21 [PATCH net-next] bridge: remove unused variable ifm Hong Zhiguo
2013-03-28 17:03 ` Stephen Hemminger
2013-03-28 18:41   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox