From patchwork Tue Jun 13 15:31:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 775320 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wnDJM6Hw9z9s71 for ; Wed, 14 Jun 2017 01:31:31 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 894FDC9E; Tue, 13 Jun 2017 15:31:29 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 757CCBE4 for ; Tue, 13 Jun 2017 15:31:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4E663142 for ; Tue, 13 Jun 2017 15:31:27 +0000 (UTC) Received: from mfilter33-d.gandi.net (mfilter33-d.gandi.net [217.70.178.164]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 0C02D1720BE; Tue, 13 Jun 2017 17:31:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter33-d.gandi.net Received: from relay4-d.mail.gandi.net ([IPv6:::ffff:217.70.183.196]) by mfilter33-d.gandi.net (mfilter33-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 6TDzjGEqR7RM; Tue, 13 Jun 2017 17:31:24 +0200 (CEST) X-Originating-IP: 173.228.112.24 Received: from sigabrt.gateway.sonic.net (173-228-112-24.dsl.dynamic.fusionbroadband.com [173.228.112.24]) (Authenticated sender: blp@ovn.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 45C741720F0; Tue, 13 Jun 2017 17:31:20 +0200 (CEST) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 13 Jun 2017 08:31:16 -0700 Message-Id: <20170613153116.14536-1-blp@ovn.org> X-Mailer: git-send-email 2.10.2 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH] hash: Remove conflicting hash_finish() prototype. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Normally, hash_finish() is declared as: static inline uint32_t hash_finish(uint32_t hash, uint32_t final) When __SSE4_2__ && __x86_64__, it is declared as: static inline uint32_t hash_finish(uint64_t hash, uint64_t final) A recent commit added an unneeded prototype in the first form, which caused an error due to the redeclaration of a different type when the second form was actually used. This removes the prototype, fixing the problem. It may not be a great idea to have two different forms for this function, but it's long standing and so I don't want to change it immediately without proper consideration. Reported-by: "Fischetti, Antonio" Fixes: 67702b79d845 ("hash: New helper functions for adding words in a buffer to a hash.") Signed-off-by: Ben Pfaff Acked-by: Darrell Ball --- lib/hash.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/hash.h b/lib/hash.h index 7dffeaa9cacc..a642a1e97954 100644 --- a/lib/hash.h +++ b/lib/hash.h @@ -92,7 +92,6 @@ static inline uint32_t mhash_finish(uint32_t hash) static inline uint32_t hash_add(uint32_t hash, uint32_t data); static inline uint32_t hash_add64(uint32_t hash, uint64_t data); -static inline uint32_t hash_finish(uint32_t hash, uint32_t final); static inline uint32_t hash_add_words(uint32_t, const uint32_t *, size_t); static inline uint32_t hash_add_words64(uint32_t, const uint64_t *, size_t);