From patchwork Mon Jan 2 07:17:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 13086553 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D079EC4167B for ; Mon, 2 Jan 2023 07:17:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229544AbjABHRq (ORCPT ); Mon, 2 Jan 2023 02:17:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjABHRp (ORCPT ); Mon, 2 Jan 2023 02:17:45 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7617F1D7 for ; Sun, 1 Jan 2023 23:17:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=fKPzRfi0DSM6WiKOgR1EYKzv+/xISJ8rDQnz71O7KOo=; b=I7X0qdvaL5VnegEK+T58HLYqVg PvazixTDuUvJccyGLQHJvI05PJfSIk9OKx5GjQpiFhuSWz26rFtXvcb8mOA6Gtwn3n0aBZwKRIbFh Ho5bNaY7G+9Sl88Pw9ZshAYLGw1rBjpIU2V2XCcUvjXLnGA0NXZRcqPfg+IA26Tjj0xexDrr9snaD pzgO6yF2RgjtWt8LMPu3cpZLItOzawDjEslOREcL6oZ/RG1JQ6DGT4TLZ6wunBrtXs5/KxOXZ54dM wgseBZ/YkORRah+pz+8jCwOpVO2TahJoanuOphFZmsY3Qpb2m4q99z28MAktog07Zkgqf5E1+c882 Nk9RQylQ==; Received: from [2601:1c2:d80:3110::a2e7] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCF4l-009C2O-AE; Mon, 02 Jan 2023 07:17:39 +0000 From: Randy Dunlap To: netdev@vger.kernel.org Cc: Randy Dunlap , Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: [PATCH net-next] net: sched: htb: fix htb_classify() kernel-doc Date: Sun, 1 Jan 2023 23:17:37 -0800 Message-Id: <20230102071737.24378-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Fix W=1 kernel-doc warning: net/sched/sch_htb.c:214: warning: expecting prototype for htb_classify(). Prototype was for HTB_DIRECT() instead by moving the HTB_DIRECT() macro above the function. Add kernel-doc notation for function parameters as well. Signed-off-by: Randy Dunlap Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni --- net/sched/sch_htb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff -- a/net/sched/sch_htb.c b/net/sched/sch_htb.c --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -199,8 +199,14 @@ static unsigned long htb_search(struct Q { return (unsigned long)htb_find(handle, sch); } + +#define HTB_DIRECT ((struct htb_class *)-1L) + /** * htb_classify - classify a packet into class + * @skb: the socket buffer + * @sch: the active queue discipline + * @qerr: pointer for returned status code * * It returns NULL if the packet should be dropped or -1 if the packet * should be passed directly thru. In all other cases leaf class is returned. @@ -211,8 +217,6 @@ static unsigned long htb_search(struct Q * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessful * then finish and return direct queue. */ -#define HTB_DIRECT ((struct htb_class *)-1L) - static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {