netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net-next] act_mirred: fix a typo in get_dev
@ 2016-12-03 18:36 Cong Wang
  2016-12-03 18:59 ` Eric Dumazet
  2016-12-04 13:12 ` Hadar Hen Zion
  0 siblings, 2 replies; 4+ messages in thread
From: Cong Wang @ 2016-12-03 18:36 UTC (permalink / raw)
  To: netdev; +Cc: Cong Wang, Hadar Hen Zion, Jiri Pirko

Cc: Hadar Hen Zion <hadarh@mellanox.com>
Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/sched/act_mirred.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index bb09ba3..2d9fa6e 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -321,7 +321,7 @@ static int tcf_mirred_device(const struct tc_action *a, struct net *net,
 	int ifindex = tcf_mirred_ifindex(a);
 
 	*mirred_dev = __dev_get_by_index(net, ifindex);
-	if (!mirred_dev)
+	if (!*mirred_dev)
 		return -EINVAL;
 	return 0;
 }
-- 
2.1.4

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

* Re: [Patch net-next] act_mirred: fix a typo in get_dev
  2016-12-03 18:36 [Patch net-next] act_mirred: fix a typo in get_dev Cong Wang
@ 2016-12-03 18:59 ` Eric Dumazet
  2016-12-04  0:28   ` David Miller
  2016-12-04 13:12 ` Hadar Hen Zion
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2016-12-03 18:59 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev, Hadar Hen Zion, Jiri Pirko

On Sat, 2016-12-03 at 10:36 -0800, Cong Wang wrote:
> Cc: Hadar Hen Zion <hadarh@mellanox.com>
> Cc: Jiri Pirko <jiri@mellanox.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> ---
>  net/sched/act_mirred.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
> index bb09ba3..2d9fa6e 100644
> --- a/net/sched/act_mirred.c
> +++ b/net/sched/act_mirred.c
> @@ -321,7 +321,7 @@ static int tcf_mirred_device(const struct tc_action *a, struct net *net,
>  	int ifindex = tcf_mirred_ifindex(a);
>  
>  	*mirred_dev = __dev_get_by_index(net, ifindex);
> -	if (!mirred_dev)
> +	if (!*mirred_dev)
>  		return -EINVAL;
>  	return 0;
>  }

Fixes: 255cb30425c0 ("net/sched: act_mirred: Add new tc_action_ops get_dev()")
Acked-by: Eric Dumazet <edumazet@google.com>

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

* Re: [Patch net-next] act_mirred: fix a typo in get_dev
  2016-12-03 18:59 ` Eric Dumazet
@ 2016-12-04  0:28   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-12-04  0:28 UTC (permalink / raw)
  To: eric.dumazet; +Cc: xiyou.wangcong, netdev, hadarh, jiri

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 03 Dec 2016 10:59:18 -0800

> On Sat, 2016-12-03 at 10:36 -0800, Cong Wang wrote:
>> Cc: Hadar Hen Zion <hadarh@mellanox.com>
>> Cc: Jiri Pirko <jiri@mellanox.com>
>> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
>> ---
>>  net/sched/act_mirred.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
>> index bb09ba3..2d9fa6e 100644
>> --- a/net/sched/act_mirred.c
>> +++ b/net/sched/act_mirred.c
>> @@ -321,7 +321,7 @@ static int tcf_mirred_device(const struct tc_action *a, struct net *net,
>>  	int ifindex = tcf_mirred_ifindex(a);
>>  
>>  	*mirred_dev = __dev_get_by_index(net, ifindex);
>> -	if (!mirred_dev)
>> +	if (!*mirred_dev)
>>  		return -EINVAL;
>>  	return 0;
>>  }
> 
> Fixes: 255cb30425c0 ("net/sched: act_mirred: Add new tc_action_ops get_dev()")
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied.

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

* Re: [Patch net-next] act_mirred: fix a typo in get_dev
  2016-12-03 18:36 [Patch net-next] act_mirred: fix a typo in get_dev Cong Wang
  2016-12-03 18:59 ` Eric Dumazet
@ 2016-12-04 13:12 ` Hadar Hen Zion
  1 sibling, 0 replies; 4+ messages in thread
From: Hadar Hen Zion @ 2016-12-04 13:12 UTC (permalink / raw)
  To: Cong Wang, netdev; +Cc: Jiri Pirko



On 12/3/2016 8:36 PM, Cong Wang wrote:
> Cc: Hadar Hen Zion <hadarh@mellanox.com>
> Cc: Jiri Pirko <jiri@mellanox.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> ---
>   net/sched/act_mirred.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
> index bb09ba3..2d9fa6e 100644
> --- a/net/sched/act_mirred.c
> +++ b/net/sched/act_mirred.c
> @@ -321,7 +321,7 @@ static int tcf_mirred_device(const struct tc_action *a, struct net *net,
>   	int ifindex = tcf_mirred_ifindex(a);
>   
>   	*mirred_dev = __dev_get_by_index(net, ifindex);
> -	if (!mirred_dev)
> +	if (!*mirred_dev)
>   		return -EINVAL;
>   	return 0;
>   }
Thank you for this fix! good catch.
I know it's already applied.

Hadar

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

end of thread, other threads:[~2016-12-05  3:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-03 18:36 [Patch net-next] act_mirred: fix a typo in get_dev Cong Wang
2016-12-03 18:59 ` Eric Dumazet
2016-12-04  0:28   ` David Miller
2016-12-04 13:12 ` Hadar Hen Zion

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).