From patchwork Thu Sep 30 16:17:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changli Gao X-Patchwork-Id: 67131 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BD9D3B6F01 for ; Fri, 8 Oct 2010 19:05:39 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755533Ab0JHIFO (ORCPT ); Fri, 8 Oct 2010 04:05:14 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:58843 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755495Ab0JHIFI (ORCPT ); Fri, 8 Oct 2010 04:05:08 -0400 Received: by pwj4 with SMTP id 4so41067pwj.19 for ; Fri, 08 Oct 2010 01:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=6oPFBz2FoEAMDyemNEj640xrkffRyGa3mlxC9IQiZds=; b=gmJkZIPRe0sr/lca+eXQUGHa0Bc6svntiWtqKPy2KurwNeJ9Rb4KHljAMKWaRl7Aa3 wAZ4kBaVz7X7+Be3SPGqw18PseSqfJ/1D/uh6bDwcZ3FRllvWfvuVFPE6Vdg5nGCTnhe Ewc7YxHraqYmERvswGGjMWJ7G4uRkgYtqeUXs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=kXcbr/fWSIrOV4vI+XrxyKxKM1MFT7stpY5sxe1NCT28lWtdRuI6kh7MgZkCA2cUiA LD8PX8iOUWH0QwGoLzF4O+2UFTc1XovEvAB9Wq9ZY43u/jB74fx2m9HJydoNaCJ+c+Na G9PGMSYATYy3wU35T17v7fYFSXzU252k6vZXo= Received: by 10.114.38.8 with SMTP id l8mr2289790wal.85.1286525107044; Fri, 08 Oct 2010 01:05:07 -0700 (PDT) Received: from localhost.localdomain ([123.150.144.172]) by mx.google.com with ESMTPS id d31sm2365201wam.5.2010.10.08.01.05.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 08 Oct 2010 01:05:05 -0700 (PDT) From: Changli Gao To: Jamal Hadi Salim Cc: "David S. Miller" , netdev@vger.kernel.org, Changli Gao Subject: [PATCH] net_sched: use __TCA_HTB_MAX and TCA_HTB_MAX Date: Fri, 1 Oct 2010 00:17:44 +0800 Message-Id: <1285863464-5299-1-git-send-email-xiaosuo@gmail.com> X-Mailer: git-send-email 1.7.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Changli Gao --- net/sched/sch_htb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 4be8d04..87d9449 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -1302,14 +1302,14 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, struct htb_class *cl = (struct htb_class *)*arg, *parent; struct nlattr *opt = tca[TCA_OPTIONS]; struct qdisc_rate_table *rtab = NULL, *ctab = NULL; - struct nlattr *tb[TCA_HTB_RTAB + 1]; + struct nlattr *tb[__TCA_HTB_MAX]; struct tc_htb_opt *hopt; /* extract all subattrs from opt attr */ if (!opt) goto failure; - err = nla_parse_nested(tb, TCA_HTB_RTAB, opt, htb_policy); + err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy); if (err < 0) goto failure;