<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2022-02-11 11:17 a.m., Alex Sierra
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:20220211161758.29610-1-alex.sierra@amd.com">
      <pre class="moz-quote-pre" wrap="">Avoid spam the kernel log on application memory allocation failures.
__func__ argument was also removed from dev_fmt macro due to
parameter conflicts with dynamic_dev_dbg.
</pre>
    </blockquote>
    Looks good to me. Reviewed-by: Philip Yang
    <a class="moz-txt-link-rfc2396E" href="mailto:Philip.Yang@amd.com"><Philip.Yang@amd.com></a><br>
    <blockquote type="cite" cite="mid:20220211161758.29610-1-alex.sierra@amd.com">
      <pre class="moz-quote-pre" wrap="">
Signed-off-by: Alex Sierra <a class="moz-txt-link-rfc2396E" href="mailto:alex.sierra@amd.com"><alex.sierra@amd.com></a>
---
 drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index 88db82b3d443..befaadc0e854 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -36,7 +36,7 @@
 #ifdef dev_fmt
 #undef dev_fmt
 #endif
-#define dev_fmt(fmt) "kfd_migrate: %s: " fmt, __func__
+#define dev_fmt(fmt) "kfd_migrate: " fmt
 
 static uint64_t
 svm_migrate_direct_mapping_addr(struct amdgpu_device *adev, uint64_t addr)
@@ -312,7 +312,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
 
        r = svm_range_vram_node_new(adev, prange, true);
        if (r) {
-               dev_err(adev->dev, "fail %d to alloc vram\n", r);
+               dev_dbg(adev->dev, "fail %d dma_map_page\n", r);
                goto out;
        }
 
@@ -332,7 +332,8 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
                                              DMA_TO_DEVICE);
                        r = dma_mapping_error(dev, src[i]);
                        if (r) {
-                               dev_err(adev->dev, "fail %d dma_map_page\n", r);
+                               dev_err(adev->dev, "%s: fail %d dma_map_page\n",
+                                       __func__, r);
                                goto out_free_vram_pages;
                        }
                } else {
@@ -612,7 +613,7 @@ svm_migrate_copy_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
                dst[i] = dma_map_page(dev, dpage, 0, PAGE_SIZE, DMA_FROM_DEVICE);
                r = dma_mapping_error(dev, dst[i]);
                if (r) {
-                       dev_err(adev->dev, "fail %d dma_map_page\n", r);
+                       dev_err(adev->dev, "%s: fail %d dma_map_page\n", __func__, r);
                        goto out_oom;
                }
 
</pre>
    </blockquote>
  </body>
</html>