From patchwork Thu Sep 13 23:57:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 10600167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 69D5F14BD for ; Thu, 13 Sep 2018 23:58:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF4852B5DA for ; Thu, 13 Sep 2018 23:58:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2ECF2B5E2; Thu, 13 Sep 2018 23:58:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 99F4E2B5DA for ; Thu, 13 Sep 2018 23:58:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E1826E3C6; Thu, 13 Sep 2018 23:58:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 114DF6E3C6 for ; Thu, 13 Sep 2018 23:58:27 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Sep 2018 16:58:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,371,1531810800"; d="scan'208";a="263336602" Received: from ldmartin-desk.jf.intel.com ([10.24.8.150]) by fmsmga006.fm.intel.com with ESMTP; 13 Sep 2018 16:58:26 -0700 From: Lucas De Marchi To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm v2 02/13] libkms: annotate public functions Date: Thu, 13 Sep 2018 16:57:13 -0700 Message-Id: <20180913235724.30476-3-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180913235724.30476-1-lucas.demarchi@intel.com> References: <20180913235724.30476-1-lucas.demarchi@intel.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Engestrom , Daniel Vetter , Rodrigo Vivi MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This was done with: nm --dynamic --defined-only build/libkms/libkms.so | \ grep kms_ | \ cut -d' ' -f3 > /tmp/a.txt while read sym; do read f func line _ <<<$(cscope -d -L -1 $sym) if [ ! -z "$f" ]; then sed -i "${line}s/^/drm_public /" $f fi done < /tmp/a.txt The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't. Signed-off-by: Lucas De Marchi --- libkms/api.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libkms/api.c b/libkms/api.c index 22dd32d7..caca1a87 100644 --- a/libkms/api.c +++ b/libkms/api.c @@ -33,12 +33,12 @@ #include "libdrm_macros.h" #include "internal.h" -int kms_create(int fd, struct kms_driver **out) +drm_public int kms_create(int fd, struct kms_driver **out) { return linux_create(fd, out); } -int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) +drm_public int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) { switch (key) { case KMS_BO_TYPE: @@ -49,7 +49,7 @@ int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) return kms->get_prop(kms, key, out); } -int kms_destroy(struct kms_driver **kms) +drm_public int kms_destroy(struct kms_driver **kms) { if (!(*kms)) return 0; @@ -59,7 +59,7 @@ int kms_destroy(struct kms_driver **kms) return 0; } -int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo **out) +drm_public int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo **out) { unsigned width = 0; unsigned height = 0; @@ -97,7 +97,7 @@ int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo ** return kms->bo_create(kms, width, height, type, attr, out); } -int kms_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) +drm_public int kms_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) { switch (key) { case KMS_PITCH: @@ -113,17 +113,17 @@ int kms_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) return 0; } -int kms_bo_map(struct kms_bo *bo, void **out) +drm_public int kms_bo_map(struct kms_bo *bo, void **out) { return bo->kms->bo_map(bo, out); } -int kms_bo_unmap(struct kms_bo *bo) +drm_public int kms_bo_unmap(struct kms_bo *bo) { return bo->kms->bo_unmap(bo); } -int kms_bo_destroy(struct kms_bo **bo) +drm_public int kms_bo_destroy(struct kms_bo **bo) { int ret;