All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net_sched actions: use nla_parse_nested()
@ 2016-10-26 12:44 Johannes Berg
  2016-10-27 16:35 ` Cong Wang
  2016-10-29 19:01 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Berg @ 2016-10-26 12:44 UTC (permalink / raw)
  To: netdev; +Cc: Jamal Hadi Salim, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Use nla_parse_nested instead of open-coding the call to
nla_parse() with the attribute data/len.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/sched/act_api.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index c9102172ce3b..ef89ec1d51fb 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -1025,8 +1025,7 @@ static struct nlattr *find_dump_kind(const struct nlmsghdr *n)
 
 	if (tb[1] == NULL)
 		return NULL;
-	if (nla_parse(tb2, TCA_ACT_MAX, nla_data(tb[1]),
-		      nla_len(tb[1]), NULL) < 0)
+	if (nla_parse_nested(tb2, TCA_ACT_MAX, tb[1], NULL) < 0)
 		return NULL;
 	kind = tb2[TCA_ACT_KIND];
 
-- 
2.8.1

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

* Re: [PATCH] net_sched actions: use nla_parse_nested()
  2016-10-26 12:44 [PATCH] net_sched actions: use nla_parse_nested() Johannes Berg
@ 2016-10-27 16:35 ` Cong Wang
  2016-10-29 19:01 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Cong Wang @ 2016-10-27 16:35 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Linux Kernel Network Developers, Jamal Hadi Salim, Johannes Berg

On Wed, Oct 26, 2016 at 5:44 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Use nla_parse_nested instead of open-coding the call to
> nla_parse() with the attribute data/len.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Acked-by: Cong Wang <xiyou.wangcong@gmail.com>

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

* Re: [PATCH] net_sched actions: use nla_parse_nested()
  2016-10-26 12:44 [PATCH] net_sched actions: use nla_parse_nested() Johannes Berg
  2016-10-27 16:35 ` Cong Wang
@ 2016-10-29 19:01 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-10-29 19:01 UTC (permalink / raw)
  To: johannes; +Cc: netdev, jhs, johannes.berg

From: Johannes Berg <johannes@sipsolutions.net>
Date: Wed, 26 Oct 2016 14:44:33 +0200

> From: Johannes Berg <johannes.berg@intel.com>
> 
> Use nla_parse_nested instead of open-coding the call to
> nla_parse() with the attribute data/len.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Applied, thanks.

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

end of thread, other threads:[~2016-10-29 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26 12:44 [PATCH] net_sched actions: use nla_parse_nested() Johannes Berg
2016-10-27 16:35 ` Cong Wang
2016-10-29 19:01 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.