[PATCH] drm: shrinker: Add a prefix on purging logs

Ezequiel Garcia ezequiel at collabora.com
Sat Dec 14 16:20:49 UTC 2019


It's not entirely obvious why these messages have
"info" severity. In any case, add a proper driver prefix
to give the user a bit of context of where they are coming from.

Signed-off-by: Ezequiel Garcia <ezequiel at collabora.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_shrinker.c     | 2 ++
 drivers/gpu/drm/msm/msm_gem_shrinker.c           | 2 ++
 drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
index 3a926a8755c6..cd0372a1d936 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
@@ -4,6 +4,8 @@
  * Copyright © 2008-2015 Intel Corporation
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/oom.h>
 #include <linux/sched/mm.h>
 #include <linux/shmem_fs.h>
diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
index 722d61668a97..0620d441a2cc 100644
--- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
+++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
@@ -4,6 +4,8 @@
  * Author: Rob Clark <robdclark at gmail.com>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "msm_drv.h"
 #include "msm_gem.h"
 
diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
index 458f0fa68111..b9d0e821c3f6 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
@@ -6,6 +6,8 @@
  * Author: Rob Clark <robdclark at gmail.com>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/list.h>
 
 #include <drm/drm_device.h>
-- 
2.22.0



More information about the dri-devel mailing list