ttm_trace_dma_map/ttm_trace_dma_unmap is never used anymore. Move the pr_fmt prefix into this header.
Signed-off-by: Huang Rui ray.huang@amd.com --- include/drm/ttm/ttm_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/drm/ttm/ttm_debug.h b/include/drm/ttm/ttm_debug.h index b5e460f..bd7cf37 100644 --- a/include/drm/ttm/ttm_debug.h +++ b/include/drm/ttm/ttm_debug.h @@ -27,5 +27,5 @@ /* * Authors: Tom St Denis tom.stdenis@amd.com */ -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
Using the debug header instead of macro at the start of the files.
Signed-off-by: Huang Rui ray.huang@amd.com --- 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(-)
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c index 6050dc8..53fa96f 100644 --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c @@ -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> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index ca5a8d0..469a3f1 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -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> diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index eebb4c0..fa5e237 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -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> diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index acd63b7..f51d70f 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c @@ -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> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index b40a467..4363420 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -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> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index bf876fa..0017d6d 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c @@ -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 */ diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index 2ec448e..4fa8a51 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -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> diff --git a/drivers/gpu/drm/vmwgfx/ttm_object.c b/drivers/gpu/drm/vmwgfx/ttm_object.c index 1607778..cd77370 100644 --- a/drivers/gpu/drm/vmwgfx/ttm_object.c +++ b/drivers/gpu/drm/vmwgfx/ttm_object.c @@ -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>
Am 07.04.20 um 08:44 schrieb Huang Rui:
I would just completely remove the file since it isn't used any more.
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.
dri-devel@lists.freedesktop.org