diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-09-13 16:06:31 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-09-19 22:46:45 -0700 |
commit | d1db9dd2005dccf86325d254124a5f58d0c8739c (patch) | |
tree | b6a23d4fed02aeed0b34c414cbc6fa005c1e7c5a | |
parent | 9f45264815eff6ebeba3a7ed2149b5b29d5d6707 (diff) |
tegra: annotate public functions
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
In which /tmp/a.txt contains the public symbols from
tegra-symbol-check. 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 <lucas.demarchi@intel.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
-rw-r--r-- | tegra/tegra.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tegra/tegra.c b/tegra/tegra.c index 1d7268e5..cf00a3ca 100644 --- a/tegra/tegra.c +++ b/tegra/tegra.c @@ -70,7 +70,7 @@ static int drm_tegra_wrap(struct drm_tegra **drmp, int fd, bool close) return 0; } -int drm_tegra_new(struct drm_tegra **drmp, int fd) +drm_public int drm_tegra_new(struct drm_tegra **drmp, int fd) { bool supported = false; drmVersionPtr version; @@ -90,7 +90,7 @@ int drm_tegra_new(struct drm_tegra **drmp, int fd) return drm_tegra_wrap(drmp, fd, false); } -void drm_tegra_close(struct drm_tegra *drm) +drm_public void drm_tegra_close(struct drm_tegra *drm) { if (!drm) return; @@ -101,7 +101,7 @@ void drm_tegra_close(struct drm_tegra *drm) free(drm); } -int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm, +drm_public int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm, uint32_t flags, uint32_t size) { struct drm_tegra_gem_create args; @@ -139,7 +139,7 @@ int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm, return 0; } -int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm, +drm_public int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm, uint32_t handle, uint32_t flags, uint32_t size) { struct drm_tegra_bo *bo; @@ -162,7 +162,7 @@ int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm, return 0; } -struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo) +drm_public struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo) { if (bo) atomic_inc(&bo->ref); @@ -170,13 +170,13 @@ struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo) return bo; } -void drm_tegra_bo_unref(struct drm_tegra_bo *bo) +drm_public void drm_tegra_bo_unref(struct drm_tegra_bo *bo) { if (bo && atomic_dec_and_test(&bo->ref)) drm_tegra_bo_free(bo); } -int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle) +drm_public int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle) { if (!bo || !handle) return -EINVAL; @@ -186,7 +186,7 @@ int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle) return 0; } -int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr) +drm_public int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr) { struct drm_tegra *drm = bo->drm; @@ -218,7 +218,7 @@ int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr) return 0; } -int drm_tegra_bo_unmap(struct drm_tegra_bo *bo) +drm_public int drm_tegra_bo_unmap(struct drm_tegra_bo *bo) { if (!bo) return -EINVAL; @@ -234,7 +234,7 @@ int drm_tegra_bo_unmap(struct drm_tegra_bo *bo) return 0; } -int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags) +drm_public int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags) { struct drm_tegra_gem_get_flags args; struct drm_tegra *drm = bo->drm; @@ -257,7 +257,7 @@ int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags) return 0; } -int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags) +drm_public int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags) { struct drm_tegra_gem_get_flags args; struct drm_tegra *drm = bo->drm; @@ -278,7 +278,7 @@ int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags) return 0; } -int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo, +drm_public int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo, struct drm_tegra_bo_tiling *tiling) { struct drm_tegra_gem_get_tiling args; @@ -304,7 +304,7 @@ int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo, return 0; } -int drm_tegra_bo_set_tiling(struct drm_tegra_bo *bo, +drm_public int drm_tegra_bo_set_tiling(struct drm_tegra_bo *bo, const struct drm_tegra_bo_tiling *tiling) { struct drm_tegra_gem_set_tiling args; |