From patchwork Wed Apr 1 16:15:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 6141241 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 37831BF4A6 for ; Wed, 1 Apr 2015 16:12:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4CC5E2035E for ; Wed, 1 Apr 2015 16:12:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3E47D20154 for ; Wed, 1 Apr 2015 16:12:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4833A6E8C8; Wed, 1 Apr 2015 09:12:44 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 638F06E8CA for ; Wed, 1 Apr 2015 09:12:42 -0700 (PDT) Received: by wibgn9 with SMTP id gn9so72895748wib.1 for ; Wed, 01 Apr 2015 09:12:41 -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=PQUr+4sZ+N+o4g8q0bMdhL3Ky1L3Ou/vn97Eu0VU6Ag=; b=sIlUkvZo1fUsl2DyaSF8/15t6drsmTqeUdcmx+IZzHmFY/RoB2ntqp+hoaI+w6ckbY svIa1MCHITbmzl0bSpy8t9798tpHnbRZ8Gp1/+vrPoIYbqkYDCG3fV2t+pmwyvPfNzg3 MvQzodJcP8KAZjPvLO0vQ8YeYsxHG/SdS3j0I7e7y+yY+MCHfHu1msSfRPO0OmLoNkVv 1cA6ytW7ZOTJrMHeq5IJqCZPSOgyppvyL4C9q2HYZjB+LErauETC/gLIImPtULU4wjch 0JT6fQe+aJ8Ar9Bl+T6SopT8zyPWDLhZ6HHU6EfgNCz5AJfn6kDczCcNB1Df2XEM1CHE 56UA== X-Received: by 10.180.24.233 with SMTP id x9mr16881326wif.9.1427904761779; Wed, 01 Apr 2015 09:12:41 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by mx.google.com with ESMTPSA id ge8sm3319498wjc.32.2015.04.01.09.12.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 09:12:40 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 13/24] intel: annotate the private symbols Date: Wed, 1 Apr 2015 17:15:24 +0100 Message-Id: <1427904935-14387-14-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.3.1 In-Reply-To: <1427904935-14387-1-git-send-email-emil.l.velikov@gmail.com> References: <1427904935-14387-1-git-send-email-emil.l.velikov@gmail.com> Cc: Daniel Vetter , emil.l.velikov@gmail.com 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 They are less and easier to track than the public ones. The macro drm_public will be going away by the end of the series. Cc: Damien Lespiau Cc: Daniel Vetter Signed-off-by: Emil Velikov --- intel/mm.c | 17 +++++++++++------ intel/mm.h | 19 +++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/intel/mm.c b/intel/mm.c index 10b74bf..9c67660 100644 --- a/intel/mm.c +++ b/intel/mm.c @@ -22,13 +22,18 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include "xf86drm.h" +#include "libdrm.h" #include "mm.h" -void mmDumpMemInfo(const struct mem_block *heap) +drm_private void mmDumpMemInfo(const struct mem_block *heap) { drmMsg("Memory heap %p:\n", (void *)heap); if (heap == 0) { @@ -54,7 +59,7 @@ void mmDumpMemInfo(const struct mem_block *heap) drmMsg("End of memory blocks\n"); } -struct mem_block *mmInit(int ofs, int size) +drm_private struct mem_block *mmInit(int ofs, int size) { struct mem_block *heap, *block; @@ -159,8 +164,8 @@ static struct mem_block *SliceBlock(struct mem_block *p, return p; } -struct mem_block *mmAllocMem(struct mem_block *heap, int size, int align2, - int startSearch) +drm_private struct mem_block *mmAllocMem(struct mem_block *heap, int size, + int align2, int startSearch) { struct mem_block *p; const int mask = (1 << align2) - 1; @@ -215,7 +220,7 @@ static int Join2Blocks(struct mem_block *p) return 0; } -int mmFreeMem(struct mem_block *b) +drm_private int mmFreeMem(struct mem_block *b) { if (!b) return 0; @@ -242,7 +247,7 @@ int mmFreeMem(struct mem_block *b) return 0; } -void mmDestroy(struct mem_block *heap) +drm_private void mmDestroy(struct mem_block *heap) { struct mem_block *p; diff --git a/intel/mm.h b/intel/mm.h index c7dd8b0..01813a5 100644 --- a/intel/mm.h +++ b/intel/mm.h @@ -29,6 +29,12 @@ #ifndef MM_H #define MM_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "libdrm.h" + struct mem_block { struct mem_block *next, *prev; struct mem_block *next_free, *prev_free; @@ -42,7 +48,7 @@ struct mem_block { * input: total size in bytes * return: a heap pointer if OK, NULL if error */ -extern struct mem_block *mmInit(int ofs, int size); +drm_private extern struct mem_block *mmInit(int ofs, int size); /** * Allocate 'size' bytes with 2^align2 bytes alignment, @@ -54,24 +60,25 @@ extern struct mem_block *mmInit(int ofs, int size); * startSearch = linear offset from start of heap to begin search * return: pointer to the allocated block, 0 if error */ -extern struct mem_block *mmAllocMem(struct mem_block *heap, int size, - int align2, int startSearch); +drm_private extern struct mem_block *mmAllocMem(struct mem_block *heap, + int size, int align2, + int startSearch); /** * Free block starts at offset * input: pointer to a block * return: 0 if OK, -1 if error */ -extern int mmFreeMem(struct mem_block *b); +drm_private extern int mmFreeMem(struct mem_block *b); /** * destroy MM */ -extern void mmDestroy(struct mem_block *mmInit); +drm_private extern void mmDestroy(struct mem_block *mmInit); /** * For debuging purpose. */ -extern void mmDumpMemInfo(const struct mem_block *mmInit); +drm_private extern void mmDumpMemInfo(const struct mem_block *mmInit); #endif