LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] drm: msm: adreno_gpu.c: Add and use pr_fmt(fmt)
@ 2021-08-26  2:23 zhaoxiao
  2021-10-01 22:36 ` Dmitry Baryshkov
  0 siblings, 1 reply; 2+ messages in thread
From: zhaoxiao @ 2021-08-26  2:23 UTC (permalink / raw)
  To: robdclark, sean, airlied, daniel
  Cc: jordan, saiprakash.ranjan, jonathan, airlied, smasetty,
	konrad.dybcio, akhilpo, linux-arm-msm, dri-devel, freedreno,
	linux-kernel, zhaoxiao

Use a more common logging style.

Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
---
v2:Remove the line: #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
   drivers/gpu/drm/msm/adreno/adreno_gpu.c:23:9: warning: 'pr_fmt' macro redefined [-Wmacro-redefined]
   #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
           ^
   include/linux/printk.h:348:9: note: previous definition is here
   #define pr_fmt(fmt) fmt

 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 9f5a30234b33..f10e9e04c13b 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -753,7 +753,7 @@ void adreno_dump_info(struct msm_gpu *gpu)
 	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
 	int i;
 
-	printk("revision: %d (%d.%d.%d.%d)\n",
+	pr_info("revision: %d (%d.%d.%d.%d)\n",
 			adreno_gpu->info->revn, adreno_gpu->rev.core,
 			adreno_gpu->rev.major, adreno_gpu->rev.minor,
 			adreno_gpu->rev.patchid);
@@ -761,12 +761,12 @@ void adreno_dump_info(struct msm_gpu *gpu)
 	for (i = 0; i < gpu->nr_rings; i++) {
 		struct msm_ringbuffer *ring = gpu->rb[i];
 
-		printk("rb %d: fence:    %d/%d\n", i,
+		pr_info("rb %d: fence:    %d/%d\n", i,
 			ring->memptrs->fence,
 			ring->seqno);
 
-		printk("rptr:     %d\n", get_rptr(adreno_gpu, ring));
-		printk("rb wptr:  %d\n", get_wptr(ring));
+		pr_info("rptr:     %d\n", get_rptr(adreno_gpu, ring));
+		pr_info("rb wptr:  %d\n", get_wptr(ring));
 	}
 }
 
@@ -780,7 +780,7 @@ void adreno_dump(struct msm_gpu *gpu)
 		return;
 
 	/* dump these out in a form that can be parsed by demsm: */
-	printk("IO:region %s 00000000 00020000\n", gpu->name);
+	pr_info("IO:region %s 00000000 00020000\n", gpu->name);
 	for (i = 0; adreno_gpu->registers[i] != ~0; i += 2) {
 		uint32_t start = adreno_gpu->registers[i];
 		uint32_t end   = adreno_gpu->registers[i+1];
@@ -788,7 +788,7 @@ void adreno_dump(struct msm_gpu *gpu)
 
 		for (addr = start; addr <= end; addr++) {
 			uint32_t val = gpu_read(gpu, addr);
-			printk("IO:R %08x %08x\n", addr<<2, val);
+			pr_info("IO:R %08x %08x\n", addr<<2, val);
 		}
 	}
 }
-- 
2.20.1




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] drm: msm: adreno_gpu.c: Add and use pr_fmt(fmt)
  2021-08-26  2:23 [PATCH v2] drm: msm: adreno_gpu.c: Add and use pr_fmt(fmt) zhaoxiao
@ 2021-10-01 22:36 ` Dmitry Baryshkov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Baryshkov @ 2021-10-01 22:36 UTC (permalink / raw)
  To: zhaoxiao, robdclark, sean, airlied, daniel
  Cc: jordan, saiprakash.ranjan, jonathan, airlied, smasetty,
	konrad.dybcio, akhilpo, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

On 26/08/2021 05:23, zhaoxiao wrote:
> Use a more common logging style.
> 
> Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>

Your subject tells about pr_fmt(), while the patch itself changs 
printk()s to pr_info(). Could you please fix the commit subject and 
expand/correct commit message?

> ---
> v2:Remove the line: #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>     drivers/gpu/drm/msm/adreno/adreno_gpu.c:23:9: warning: 'pr_fmt' macro redefined [-Wmacro-redefined]
>     #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>             ^
>     include/linux/printk.h:348:9: note: previous definition is here
>     #define pr_fmt(fmt) fmt
> 
>   drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> index 9f5a30234b33..f10e9e04c13b 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> @@ -753,7 +753,7 @@ void adreno_dump_info(struct msm_gpu *gpu)
>   	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
>   	int i;
>   
> -	printk("revision: %d (%d.%d.%d.%d)\n",
> +	pr_info("revision: %d (%d.%d.%d.%d)\n",
>   			adreno_gpu->info->revn, adreno_gpu->rev.core,
>   			adreno_gpu->rev.major, adreno_gpu->rev.minor,
>   			adreno_gpu->rev.patchid);
> @@ -761,12 +761,12 @@ void adreno_dump_info(struct msm_gpu *gpu)
>   	for (i = 0; i < gpu->nr_rings; i++) {
>   		struct msm_ringbuffer *ring = gpu->rb[i];
>   
> -		printk("rb %d: fence:    %d/%d\n", i,
> +		pr_info("rb %d: fence:    %d/%d\n", i,
>   			ring->memptrs->fence,
>   			ring->seqno);
>   
> -		printk("rptr:     %d\n", get_rptr(adreno_gpu, ring));
> -		printk("rb wptr:  %d\n", get_wptr(ring));
> +		pr_info("rptr:     %d\n", get_rptr(adreno_gpu, ring));
> +		pr_info("rb wptr:  %d\n", get_wptr(ring));
>   	}
>   }
>   
> @@ -780,7 +780,7 @@ void adreno_dump(struct msm_gpu *gpu)
>   		return;
>   
>   	/* dump these out in a form that can be parsed by demsm: */
> -	printk("IO:region %s 00000000 00020000\n", gpu->name);
> +	pr_info("IO:region %s 00000000 00020000\n", gpu->name);
>   	for (i = 0; adreno_gpu->registers[i] != ~0; i += 2) {
>   		uint32_t start = adreno_gpu->registers[i];
>   		uint32_t end   = adreno_gpu->registers[i+1];
> @@ -788,7 +788,7 @@ void adreno_dump(struct msm_gpu *gpu)
>   
>   		for (addr = start; addr <= end; addr++) {
>   			uint32_t val = gpu_read(gpu, addr);
> -			printk("IO:R %08x %08x\n", addr<<2, val);
> +			pr_info("IO:R %08x %08x\n", addr<<2, val);
>   		}
>   	}
>   }
> 


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-01 22:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26  2:23 [PATCH v2] drm: msm: adreno_gpu.c: Add and use pr_fmt(fmt) zhaoxiao
2021-10-01 22:36 ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).