AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
To: Grazvydas Ignotas <notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"Nath, Arindam" <Arindam.Nath-5C7GfCeVMHo@public.gmane.org>,
	"Christian K�nig"
	<deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>,
	"Koenig,
	Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 0/4] drm/amd/powerplay: introduce the cgs print helpers
Date: Fri, 23 Dec 2016 10:38:17 +0800	[thread overview]
Message-ID: <20161223023816.GA9824@hr-amur2> (raw)
In-Reply-To: <20161222105240.GA7563@hr-amur2>

On Thu, Dec 22, 2016 at 06:52:41PM +0800, Huang Rui wrote:
> On Thu, Dec 08, 2016 at 09:04:13PM +0800, Grazvydas Ignotas wrote:
> > On Thu, Dec 8, 2016 at 11:50 AM, Huang Rui <ray.huang@amd.com> wrote:
> > > On Thu, Dec 08, 2016 at 05:27:30PM +0800, Christian König wrote:
> > >> Am 08.12.2016 um 10:02 schrieb Huang Rui:
> > >> > On Thu, Dec 08, 2016 at 04:41:04PM +0800, Koenig, Christian wrote:
> > >
> > >> Using the dev_* prints in the powerplay code is fine, but don't use the
> > >> CGS or any other abstraction layer for them.
> > >>
> > >
> > > Powerplay is quite independent component without amdgpu object, it is
> > > hard to use dev_* prints without any abstraction layer.
> > 
> > Maybe you could use dev_set_name() with something powerplay related on
> > relevant devices and then dev_* will print what you want?
> > 
> > Alternatively you could do
> > 
> > #define pr_fmt(fmt) "[powerplay] " fmt
> > 
> > before #include <linux/...> and then all pr_* functions will prefix
> > their messages.
> > 
> 
> Hi Grazvydas,
> 
> I tried to put that macro before all #include <linux/...>, but complier always get a redefined warnning.
> 
>   CC [M]  /home/ray/gpu/BUILD/x86_64/linux/drivers/gpu/drm/amd/amdgpu//../powerplay/amd_powerplay.o
> /home/ray/gpu/BUILD/x86_64/linux/drivers/gpu/drm/amd/amdgpu//../powerplay/amd_powerplay.c:24:0: warning: "pr_fmt" redefined
>  #define pr_fmt(fmt) "[powerplay] " fmt
>  ^
> In file included from include/linux/kernel.h:13:0,
>                  from include/linux/list.h:8,
>                  from include/linux/agp_backend.h:33,
>                  from include/drm/drmP.h:35,
>                  from <command-line>:0:
> include/linux/printk.h:248:0: note: this is the location of the previous definition
>  #define pr_fmt(fmt) fmt
>  ^
> 

OK, I already find a way to avoid this warning, thanks.

Merry Christmas,
Rui
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      reply	other threads:[~2016-12-23  2:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08  5:23 [PATCH 0/4] drm/amd/powerplay: introduce the cgs print helpers Huang Rui
     [not found] ` <1481174591-2187-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2016-12-08  5:23   ` [PATCH 1/4] drm/amdgpu: " Huang Rui
2016-12-08  5:23   ` [PATCH 2/4] drm/amd/powerplay: update printk to cgs debug prints for smumgr Huang Rui
2016-12-08  5:23   ` [PATCH 3/4] drm/amd/powerplay: update printk to cgs debug prints for common part Huang Rui
2016-12-08  5:23   ` [PATCH 4/4] drm/amd/powerplay: update printk to cgs debug prints for hwmgr Huang Rui
2016-12-08  8:41   ` [PATCH 0/4] drm/amd/powerplay: introduce the cgs print helpers Christian König
     [not found]     ` <9672b4c9-a905-8fef-9fa4-cd0cbe94a67b-5C7GfCeVMHo@public.gmane.org>
2016-12-08  9:02       ` Huang Rui
2016-12-08  9:27         ` Christian König
     [not found]           ` <752e5cbf-0bcb-d42f-8542-6f7a788d9299-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-12-08  9:50             ` Huang Rui
2016-12-08 13:04               ` Grazvydas Ignotas
     [not found]                 ` <CANOLnOOqGWKw5XdR-d=3GRrqWQ45KT_NJymWQW39kb0RtfK5Qw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-09  2:29                   ` Huang Rui
2016-12-22 10:52                   ` Huang Rui
2016-12-23  2:38                     ` Huang Rui [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161223023816.GA9824@hr-amur2 \
    --to=ray.huang-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=Arindam.Nath-5C7GfCeVMHo@public.gmane.org \
    --cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org \
    --cc=notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox