drm/amd/amdgpu: add prefix for pr_* prints
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: add prefix for pr_* prints
amdgpu uses lots of pr_* calls for printing error messages. With this prefix, errors shall be more obvious to the end use regarding its origin, and may help debugging.
Prefix format:
[xxx.xxxxx] amdgpu: ...
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +6 -0
@@ -28,6 +28,12 @@#ifndef __AMDGPU_H__#define __AMDGPU_H__ +#ifdef pr_fmt +#undef pr_fmt +#endif + +#define pr_fmt (fmt) "amdgpu: " fmt +#include "amdgpu_ctx.h" #include <linux/atomic.h>
Signature · 1 line
2.26.0
Quoted 7 lines · Aurabindo Pillai
amdgpu uses lots of pr_* calls for printing error messages. With this prefix, errors shall be more obvious to the end use regarding its origin, and may help debugging.
Prefix format:
[xxx.xxxxx] amdgpu: ...
[]
drivers/gpu/drm/amd/amdgpu/amdgpu.h
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0
-0
[]
drivers/gpu/drm/amd/amdgpu/amdgpu.h line 39
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h +6
-0@@ -28,6 +28,12 @@#ifndef __AMDGPU_H__#define __AMDGPU_H__ +#ifdef pr_fmt +#undef pr_fmt +#endif + +#define pr_fmt (fmt) "amdgpu: " fmt +#include "amdgpu_ctx.h" #include <linux/atomic.h>
All the embedded uses of "amdgpu:" in logging
messages should also be deleted.
$ git grep -P '(?:dev_|pr_).*"amdgpu:' drivers/gpu/drm/amd/amdgpu/
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: pr_err("amdgpu: failed to validate PT BOs\n");
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: pr_err("amdgpu: failed to validate PD\n");
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: pr_err("amdgpu: failed to kmap PD, ret=%d\n", ret);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: pr_info("amdgpu: switched on\n");
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: pr_info("amdgpu: switched off\n");
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: dev_dbg(adev->dev, "amdgpu: using MSI/MSI-X.\n");
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c: dev_warn(adev->dev, "amdgpu: No suitable DMA available.\n");
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c: pr_warn("amdgpu: No suitable DMA available\n");
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c: pr_warn("amdgpu: No suitable DMA available\n");Hi Joe,
Quoted 4 lines · Joe Perches
All the embedded uses of "amdgpu:" in logging
messages should also be deleted.
Quoted 13 lines
$ git grep -P '(?:dev_|pr_).*"amdgpu:' drivers/gpu/drm/amd/amdgpu/
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: pr_err("amdgpu: failed to validate PT BOs\n");
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: pr_err("amdgpu: failed to validate PD\n");
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: pr_err("amdgpu: failed to kmap PD, ret=%d\n", ret);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: pr_info("amdgpu: switched on\n");
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: pr_info("amdgpu: switched off\n");
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c: dev_dbg(adev->dev, "amdgpu: using MSI/MSI-X.\n");
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c: dev_warn(adev->dev, "amdgpu: No suitable DMA available.\n");
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c: pr_warn("amdgpu: No suitable DMA available\n");
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c: pr_warn("amdgpu: No suitable DMA available\n");Thanks for the heads up, I shall submit another set with those changes you suggested.
Signature · 4 lines
Thanks and Regards, Aurabindo J Pillai https://aurabindo.in