[PATCH for-next] drm/ttm: make ttm_swap_ops static
From: Min-Hua Chen
Date: Fri Sep 06 2024 - 23:37:18 EST
make ttm_swap_ops static to fix the following sparse warning:
drivers/gpu/drm/ttm/ttm_bo.c:1142:31: sparse: warning: symbol
'ttm_swap_ops' was not declared. Should it be static?
Fixes: 10efe34dae79 ("drm/ttm: Use the LRU walker helper for swapping")
Signed-off-by: Min-Hua Chen <minhuadotchen@xxxxxxxxx>
---
drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 320592435252..1aab30767e41 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1139,7 +1139,7 @@ ttm_bo_swapout_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
return ret;
}
-const struct ttm_lru_walk_ops ttm_swap_ops = {
+static const struct ttm_lru_walk_ops ttm_swap_ops = {
.process_bo = ttm_bo_swapout_cb,
};
--
2.43.0