drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap
Subsystems (4)
PATCH 1/2 drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap
ttm_trace_dma_map/ttm_trace_dma_unmap is never used anymore. Move the pr_fmt prefix into this header.
--- include/drm/ttm/ttm_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/drm/ttm/ttm_debug.h +2 -2
@@ -27,5 +27,5 @@/* * Authors: Tom St Denis <[email protected]> */ -extern void ttm_trace_dma_map (struct device *dev,struct ttm_dma_tt *tt); -extern void ttm_trace_dma_unmap (struct device *dev,struct ttm_dma_tt *tt); + +#define pr_fmt (fmt) "[TTM] " fmt
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm/ttm: abstract all ttm prefix into ttm_debug header
Using the debug header instead of macro at the start of the files.
--- drivers/gpu/drm/ttm/ttm_agp_backend.c | 3 +-- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- drivers/gpu/drm/ttm/ttm_bo_vm.c | 3 +-- drivers/gpu/drm/ttm/ttm_memory.c | 3 +-- drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +-- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 +-- drivers/gpu/drm/ttm/ttm_tt.c | 3 +-- drivers/gpu/drm/vmwgfx/ttm_object.c | 3 +-- 8 files changed, 8 insertions(+), 16 deletions(-)
drivers/gpu/drm/ttm/ttm_agp_backend.c +1 -2
@@ -30,8 +30,7 @@* Keith Packard. */ -#define pr_fmt (fmt) "[TTM] " fmt - +#include <drm/ttm/ttm_debug.h> #include <drm/ttm/ttm_module.h> #include <drm/ttm/ttm_bo_driver.h> #include <drm/ttm/ttm_page_alloc.h>
drivers/gpu/drm/ttm/ttm_bo.c +1 -2
@@ -29,8 +29,7 @@* Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> */ -#define pr_fmt (fmt) "[TTM] " fmt - +#include <drm/ttm/ttm_debug.h> #include <drm/ttm/ttm_module.h> #include <drm/ttm/ttm_bo_driver.h> #include <drm/ttm/ttm_placement.h>
drivers/gpu/drm/ttm/ttm_bo_vm.c +1 -2
@@ -29,8 +29,7 @@* Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> */ -#define pr_fmt (fmt) "[TTM] " fmt - +#include <drm/ttm/ttm_debug.h> #include <drm/ttm/ttm_module.h> #include <drm/ttm/ttm_bo_driver.h> #include <drm/ttm/ttm_placement.h>
drivers/gpu/drm/ttm/ttm_memory.c +1 -2
@@ -26,8 +26,7 @@* **************************************************************************/ -#define pr_fmt (fmt) "[TTM] " fmt - +#include <drm/ttm/ttm_debug.h> #include <drm/ttm/ttm_memory.h> #include <drm/ttm/ttm_module.h> #include <drm/ttm/ttm_page_alloc.h>
drivers/gpu/drm/ttm/ttm_page_alloc.c +1 -2
@@ -31,8 +31,7 @@* - doesn't track currently in use pages */ -#define pr_fmt (fmt) "[TTM] " fmt - +#include <drm/ttm/ttm_debug.h> #include <linux/list.h> #include <linux/spinlock.h> #include <linux/highmem.h>
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +1 -2
@@ -33,8 +33,7 @@* when freed). */ -#define pr_fmt (fmt) "[TTM] " fmt - +#include <drm/ttm/ttm_debug.h> #include <linux/dma-mapping.h> #include <linux/list.h> #include <linux/seq_file.h> /* for seq_printf */
drivers/gpu/drm/ttm/ttm_tt.c +1 -2
@@ -29,8 +29,7 @@* Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> */ -#define pr_fmt (fmt) "[TTM] " fmt - +#include <drm/ttm/ttm_debug.h> #include <linux/sched.h> #include <linux/pagemap.h> #include <linux/shmem_fs.h>
drivers/gpu/drm/vmwgfx/ttm_object.c +1 -2
@@ -57,8 +57,7 @@* for fast lookup of ref objects given a base object. */ -#define pr_fmt (fmt) "[TTM] " fmt - +#include <drm/ttm/ttm_debug.h> #include <drm/ttm/ttm_module.h> #include <linux/list.h> #include <linux/spinlock.h>
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 07.04.20 um 08:44 schrieb Huang Rui:
Quoted 13 lines
ttm_trace_dma_map/ttm_trace_dma_unmap is never used anymore. Move the
pr_fmtprefix into this header.Signed-off-by Huang Rui <[email protected]>--- include/drm/ttm/ttm_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/drm/ttm/ttm_debug.h +0
-0
include/drm/ttm/ttm_debug.h line 31
Quoted 5 lines
include/drm/ttm/ttm_debug.h +0
-2@@ -27,5 +27,5 @@/* * Authors: Tom St Denis <[email protected]> */ -extern void ttm_trace_dma_map (struct device *dev,struct ttm_dma_tt *tt); -extern void ttm_trace_dma_unmap (struct device *dev,struct ttm_dma_tt *tt);
I would just completely remove the file since it isn't used any more.
include/drm/ttm/ttm_debug.h line 31
Quoted 2 lines
include/drm/ttm/ttm_debug.h +2
-0+ +#define pr_fmt (fmt) "[TTM] " fmt
Oh, that is most likely not a good idea. The pr_fmt define should be set for each file individually or otherwise we could accidentally include the file in a driver.
Regards,
Christian.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 22 lines · Christian
Am 07.04.20 um 08:44 schrieb Huang Rui:
Quoted 13 lines
ttm_trace_dma_map/ttm_trace_dma_unmap is never used anymore. Move the
pr_fmtprefix into this header.Signed-off-by Huang Rui <[email protected]>--- include/drm/ttm/ttm_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/drm/ttm/ttm_debug.h +0
-0include/drm/ttm/ttm_debug.h line 31
Quoted 5 lines
include/drm/ttm/ttm_debug.h +0
-2@@ -27,5 +27,5 @@/* * Authors: Tom St Denis <[email protected]> */ -extern void ttm_trace_dma_map (struct device *dev,struct ttm_dma_tt *tt); -extern void ttm_trace_dma_unmap (struct device *dev,struct ttm_dma_tt *tt);I would just completely remove the file since it isn't used any more.
Quoted 7 lines
include/drm/ttm/ttm_debug.h line 31
Quoted 2 lines
include/drm/ttm/ttm_debug.h +2
-0+ +#define pr_fmt (fmt) "[TTM] " fmtOh, that is most likely not a good idea. The
pr_fmtdefine should be set for each file individually or otherwise we could accidentally include the file in a driver.
OK. I will modify the patch to remove the header completely.
Thanks,
Ray
Quoted 2 lines
Regards,
Christian.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel