From: Jiri Pirko Subject: [patch net-next 08/20] net: sched: use tcf_exts_has_actions instead of exts->nr_actions Date: Fri, 28 Jul 2017 16:40:30 +0200 Message-ID: <20170728144042.6380-9-jiri@resnulli.us> References: <20170728144042.6380-1-jiri@resnulli.us> Cc: davem@davemloft.net, jhs@mojatatu.com, xiyou.wangcong@gmail.com, daniel@iogearbox.net, mlxsw@mellanox.com To: netdev@vger.kernel.org Return-path: Received: from mail-wr0-f196.google.com ([209.85.128.196]:34204 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751761AbdG1OlO (ORCPT ); Fri, 28 Jul 2017 10:41:14 -0400 Received: by mail-wr0-f196.google.com with SMTP id o33so19221319wrb.1 for ; Fri, 28 Jul 2017 07:41:14 -0700 (PDT) In-Reply-To: <20170728144042.6380-1-jiri@resnulli.us> Sender: netdev-owner@vger.kernel.org List-ID: From: Jiri Pirko For check in tcf_exts_dump use tcf_exts_has_actions helper instead of exts->nr_actions for checking if there are any actions present. Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 287ae6c..735d556 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -915,7 +915,7 @@ int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts) #ifdef CONFIG_NET_CLS_ACT struct nlattr *nest; - if (exts->action && exts->nr_actions) { + if (exts->action && tcf_exts_has_actions(exts)) { /* * again for backward compatible mode - we want * to work with both old and new modes of entering -- 2.9.3