From patchwork Thu May 6 17:54:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1475186 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fbh6k0NSBz9sW4 for ; Fri, 7 May 2021 03:54:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 322FD40599; Thu, 6 May 2021 17:54:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HaJcDu4yrfQu; Thu, 6 May 2021 17:54:29 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTP id 2351840EDA; Thu, 6 May 2021 17:54:27 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 994EFC0022; Thu, 6 May 2021 17:54:26 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 873C4C000D for ; Thu, 6 May 2021 17:54:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 76C30402AF for ; Thu, 6 May 2021 17:54:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A4kppo08LqX8 for ; Thu, 6 May 2021 17:54:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by smtp2.osuosl.org (Postfix) with ESMTPS id BD30A40E47 for ; Thu, 6 May 2021 17:54:23 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigfpe.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 64AF7FF802; Thu, 6 May 2021 17:54:21 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 6 May 2021 10:54:10 -0700 Message-Id: <20210506175410.344793-4-blp@ovn.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210506175410.344793-1-blp@ovn.org> References: <20210506175410.344793-1-blp@ovn.org> MIME-Version: 1.0 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH 3/3] classifier: Make find_match_wc() prototype and definition match. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The prototype said *, the definition said [CLS_MAX_TRIES]. GCC 11 complains about this (though it is perfectly valid from a C standards perspective). It would probably be better to make them both use [CLS_MAX_TRIES] but that's only allowed if the struct's definition is visible at the point of the prototype, which it's not. Instead of moving the definition, this commit just changes both usages to *. Signed-off-by: Ben Pfaff --- lib/classifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classifier.c b/lib/classifier.c index 2a1d155dad9f..c4790ee6baa9 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -1683,7 +1683,7 @@ find_match(const struct cls_subtable *subtable, ovs_version_t version, static const struct cls_match * find_match_wc(const struct cls_subtable *subtable, ovs_version_t version, - const struct flow *flow, struct trie_ctx trie_ctx[CLS_MAX_TRIES], + const struct flow *flow, struct trie_ctx *trie_ctx, unsigned int n_tries, struct flow_wildcards *wc) { if (OVS_UNLIKELY(!wc)) {