diff mbox series

[1/2] drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap

Message ID 1586241885-25422-1-git-send-email-ray.huang@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/ttm: clean up ttm_trace_dma_map/ttm_trace_dma_unmap | expand

Commit Message

Huang Rui April 7, 2020, 6:44 a.m. UTC
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(-)

Comments

Christian König April 7, 2020, 7:06 a.m. UTC | #1
Am 07.04.20 um 08:44 schrieb Huang Rui:
> 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);

I would just completely remove the file since it isn't used any more.

> +
> +#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.
Huang Rui April 7, 2020, 8:06 a.m. UTC | #2
On Tue, Apr 07, 2020 at 03:06:01PM +0800, Koenig, Christian wrote:
> Am 07.04.20 um 08:44 schrieb Huang Rui:
> > 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);
> 
> I would just completely remove the file since it isn't used any more.
> 
> > +
> > +#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.
> 

OK. I will modify the patch to remove the header completely.

Thanks,
Ray

> Regards,
> Christian.
diff mbox series

Patch

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