drm/ttm: Fix unused variables with huge page support
Subsystems (3)
PATCH 1/1 drm/ttm: Fix unused variables with huge page support
Signed-off-by Tom St Denis <[email protected]>
--- drivers/gpu/drm/ttm/ttm_page_alloc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_page_alloc.c +8 -1
@@ -723,7 +723,9 @@ static void ttm_put_pages(struct page **pages, unsigned npages, int flags, enum ttm_caching_state cstate) {struct ttm_page_pool *pool =ttm_get_pool (flags, false, cstate); +#ifdef CONFIG_TRANSPARENT_HUGEPAGE struct ttm_page_pool *huge =ttm_get_pool (flags, true, cstate); +#endif unsigned long irq_flags;unsigned i;
@@ -825,7 +827,9 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, enum ttm_caching_state cstate) {struct ttm_page_pool *pool =ttm_get_pool (flags, false, cstate); +#ifdef CONFIG_TRANSPARENT_HUGEPAGE struct ttm_page_pool *huge =ttm_get_pool (flags, true, cstate); +#endif struct list_head plist;struct page *p =NULL ;unsigned count;
@@ -834,7 +838,10 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags,/* No pool for cached pages */ if (pool ==NULL ) {gfp_t gfp_flags =GFP_USER ; -unsigned i, j; +unsigned i; +#ifdef CONFIG_TRANSPARENT_HUGEPAGE +unsigned j; +#endif /* set zero flag for page allocation if required */ if (flags &TTM_PAGE_FLAG_ZERO_ALLOC )
Signature · 6 lines
2.12.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 12.10.2017 um 13:26 schrieb Tom St Denis:
Quoted 1 line
Signed-off-by Tom St Denis <[email protected]>
Reviewed-by Christian König <[email protected]>
Quoted 30 lines
--- drivers/gpu/drm/ttm/ttm_page_alloc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_page_alloc.c +4
-0@@ -723,7 +723,9 @@ static void ttm_put_pages(struct page **pages, unsigned npages, int flags, enum ttm_caching_state cstate) {struct ttm_page_pool *pool =ttm_get_pool (flags, false, cstate); +#ifdef CONFIG_TRANSPARENT_HUGEPAGE struct ttm_page_pool *huge =ttm_get_pool (flags, true, cstate); +#endif unsigned long irq_flags;unsigned i;@@ -825,7 +827,9 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, enum ttm_caching_state cstate) {struct ttm_page_pool *pool =ttm_get_pool (flags, false, cstate); +#ifdef CONFIG_TRANSPARENT_HUGEPAGE struct ttm_page_pool *huge =ttm_get_pool (flags, true, cstate); +#endif struct list_head plist;struct page *p =NULL ;unsigned count;@@ -834,7 +838,10 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags,/* No pool for cached pages */
drivers/gpu/drm/ttm/ttm_page_alloc.c static int ttm_get_pages(struct page **pages, unsigned npages, int flags, · line 847
Quoted 10 lines
drivers/gpu/drm/ttm/ttm_page_alloc.c +4
-1if (pool ==NULL ) {gfp_t gfp_flags =GFP_USER ; -unsigned i, j; +unsigned i; +#ifdef CONFIG_TRANSPARENT_HUGEPAGE +unsigned j; +#endif /* set zero flag for page allocation if required */ if (flags &TTM_PAGE_FLAG_ZERO_ALLOC )
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel