From patchwork Fri Aug 7 16:44:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 6971541 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 667E1C05AC for ; Fri, 7 Aug 2015 16:41:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D9FF2041D for ; Fri, 7 Aug 2015 16:41:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6822E202D1 for ; Fri, 7 Aug 2015 16:41:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BC1A88EB5; Fri, 7 Aug 2015 09:41:06 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by gabe.freedesktop.org (Postfix) with ESMTPS id C246D7A197 for ; Fri, 7 Aug 2015 09:41:02 -0700 (PDT) Received: by wibxm9 with SMTP id xm9so68258504wib.0 for ; Fri, 07 Aug 2015 09:41:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Wejv0MrSlNtnNao66JplJn9+AIovTnab/jDbSvnr+fo=; b=fnnsnT0oVTYBwD4AdX+W5XEHRLOiT39ese6cILdwOCGTc2lt+lGFBNpLpvAZSJOxCu hmjzVaO19IGhMB+dKuu/xHO55cPQpFc3CstgZnbcn+5GKtDpg9w1Czb7R7lMQeW4JfnK w/W5F/ID51C8NwGODMvySQQy0oLSjc8z1a6nonARo2DuftiUoCwcUKf9fS6wgYO/CKLG j9hxEiXd6SIig2lWclaGOSYmRJATzzDpWMeSUjcNl8ac4vyrVSQcJYdqIMxfuQT263iL 5XpYE2W3xSXPXOmWlIAm1b4xN409C5807/ye9WEo0H21h0xNelWOhiMWdrW1BFM8ZQBe YASg== X-Received: by 10.180.91.76 with SMTP id cc12mr8276247wib.67.1438965661443; Fri, 07 Aug 2015 09:41:01 -0700 (PDT) Received: from arch-x220.localdomain (genkt-049-238.t-mobile.co.uk. [149.254.49.238]) by smtp.gmail.com with ESMTPSA id lg8sm4528960wic.12.2015.08.07.09.41.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Aug 2015 09:41:00 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 3/9] amdgpu/util_hash_table: hide private symbols from global namespace Date: Fri, 7 Aug 2015 17:44:57 +0100 Message-Id: <1438965903-6342-4-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1438965903-6342-1-git-send-email-emil.l.velikov@gmail.com> References: <1438965903-6342-1-git-send-email-emil.l.velikov@gmail.com> Cc: Alex Deucher , Emil Velikov X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Emil Velikov --- amdgpu/util_hash_table.c | 18 ++++++++++-------- amdgpu/util_hash_table.h | 24 ++++++++++++++++-------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/amdgpu/util_hash_table.c b/amdgpu/util_hash_table.c index cb7213c..ce6f1d5 100644 --- a/amdgpu/util_hash_table.c +++ b/amdgpu/util_hash_table.c @@ -69,8 +69,9 @@ util_hash_table_item(struct util_hash_iter iter) return (struct util_hash_table_item *)util_hash_iter_data(iter); } -struct util_hash_table *util_hash_table_create(unsigned (*hash)(void *key), - int (*compare)(void *key1, void *key2)) +drm_private struct util_hash_table * +util_hash_table_create(unsigned (*hash)(void *key), + int (*compare)(void *key1, void *key2)) { struct util_hash_table *ht; @@ -126,7 +127,8 @@ util_hash_table_find_item(struct util_hash_table *ht, return NULL; } -void util_hash_table_set(struct util_hash_table *ht, void *key, void *value) +drm_private void +util_hash_table_set(struct util_hash_table *ht, void *key, void *value) { unsigned key_hash; struct util_hash_table_item *item; @@ -159,7 +161,7 @@ void util_hash_table_set(struct util_hash_table *ht, void *key, void *value) } } -void *util_hash_table_get(struct util_hash_table *ht, void *key) +drm_private void *util_hash_table_get(struct util_hash_table *ht, void *key) { unsigned key_hash; struct util_hash_table_item *item; @@ -177,7 +179,7 @@ void *util_hash_table_get(struct util_hash_table *ht, void *key) return item->value; } -void util_hash_table_remove(struct util_hash_table *ht, void *key) +drm_private void util_hash_table_remove(struct util_hash_table *ht, void *key) { unsigned key_hash; struct util_hash_iter iter; @@ -200,7 +202,7 @@ void util_hash_table_remove(struct util_hash_table *ht, void *key) util_hash_erase(ht->head, iter); } -void util_hash_table_clear(struct util_hash_table *ht) +drm_private void util_hash_table_clear(struct util_hash_table *ht) { struct util_hash_iter iter; struct util_hash_table_item *item; @@ -217,7 +219,7 @@ void util_hash_table_clear(struct util_hash_table *ht) } } -void util_hash_table_foreach(struct util_hash_table *ht, +drm_private void util_hash_table_foreach(struct util_hash_table *ht, void (*callback)(void *key, void *value, void *data), void *data) { @@ -236,7 +238,7 @@ void util_hash_table_foreach(struct util_hash_table *ht, } } -void util_hash_table_destroy(struct util_hash_table *ht) +drm_private void util_hash_table_destroy(struct util_hash_table *ht) { struct util_hash_iter iter; struct util_hash_table_item *item; diff --git a/amdgpu/util_hash_table.h b/amdgpu/util_hash_table.h index 04fe704..e000128 100644 --- a/amdgpu/util_hash_table.h +++ b/amdgpu/util_hash_table.h @@ -34,6 +34,12 @@ #ifndef U_HASH_TABLE_H_ #define U_HASH_TABLE_H_ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "libdrm_macros.h" + /** * Generic purpose hash table. */ @@ -45,21 +51,23 @@ struct util_hash_table; * @param hash hash function * @param compare should return 0 for two equal keys. */ -struct util_hash_table *util_hash_table_create(unsigned (*hash)(void *key), - int (*compare)(void *key1, void *key2)); +drm_private struct util_hash_table * +util_hash_table_create(unsigned (*hash)(void *key), + int (*compare)(void *key1, void *key2)); -void util_hash_table_set(struct util_hash_table *ht, void *key, void *value); +drm_private void +util_hash_table_set(struct util_hash_table *ht, void *key, void *value); -void *util_hash_table_get(struct util_hash_table *ht, void *key); +drm_private void *util_hash_table_get(struct util_hash_table *ht, void *key); -void util_hash_table_remove(struct util_hash_table *ht, void *key); +drm_private void util_hash_table_remove(struct util_hash_table *ht, void *key); -void util_hash_table_clear(struct util_hash_table *ht); +drm_private void util_hash_table_clear(struct util_hash_table *ht); -void util_hash_table_foreach(struct util_hash_table *ht, +drm_private void util_hash_table_foreach(struct util_hash_table *ht, void (*callback)(void *key, void *value, void *data), void *data); -void util_hash_table_destroy(struct util_hash_table *ht); +drm_private void util_hash_table_destroy(struct util_hash_table *ht); #endif /* U_HASH_TABLE_H_ */