OSDN Git Service

drm/ttm: fix unused function warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 4 Dec 2020 16:51:52 +0000 (17:51 +0100)
committerChristian König <christian.koenig@amd.com>
Wed, 16 Dec 2020 15:24:25 +0000 (16:24 +0100)
commit846f151d03f796bf1b303784edaf3a22e3f51377
tree986f6e687b42e7b3bcba34e52740ddae17788f53
parentee46d16d2e40bebc2aa790fd7b6a056466ff895c
drm/ttm: fix unused function warning

ttm_pool_type_count() is not used when debugfs is disabled:

drivers/gpu/drm/ttm/ttm_pool.c:243:21: error: unused function 'ttm_pool_type_count' [-Werror,-Wunused-function]
static unsigned int ttm_pool_type_count(struct ttm_pool_type *pt)

Move the definition into the #ifdef block.

Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/405695/
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/ttm/ttm_pool.c