From: Thomas Zimmermann <tzimmermann@suse.de>
To: Athul Raj Kollareth <krathul3152@gmail.com>,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
airlied@gmail.com, simona@ffwll.ch, skhan@linuxfoundation.org
Cc: dri-devel@lists.freedesktop.org,
linux-kernel-mentees@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpu/drm: Replace the deprecated logging functions in drm_gem* files
Date: Mon, 18 Aug 2025 09:09:40 +0200 [thread overview]
Message-ID: <f94151b4-893a-4758-a118-153076a20d3c@suse.de> (raw)
In-Reply-To: <20250816152604.14667-1-krathul3152@gmail.com>
Hi
Am 16.08.25 um 17:26 schrieb Athul Raj Kollareth:
> Replace the deprecated logging functions used in drm_gem* helper files
> with their appropriate ones specified in drm_print.h.
>
> Signed-off-by: Athul Raj Kollareth <krathul3152@gmail.com>
> ---
> drivers/gpu/drm/drm_gem.c | 4 ++--
> drivers/gpu/drm/drm_gem_dma_helper.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
> index 4a89b6acb6af..91f528d8900f 100644
> --- a/drivers/gpu/drm/drm_gem.c
> +++ b/drivers/gpu/drm/drm_gem.c
> @@ -102,7 +102,7 @@ drm_gem_init(struct drm_device *dev)
> vma_offset_manager = drmm_kzalloc(dev, sizeof(*vma_offset_manager),
> GFP_KERNEL);
> if (!vma_offset_manager) {
> - DRM_ERROR("out of memory\n");
> + drm_err(dev, "out of memory\n");
> return -ENOMEM;
> }
>
> @@ -805,7 +805,7 @@ int drm_gem_objects_lookup(struct drm_file *filp, void __user *bo_handles,
>
> if (copy_from_user(handles, bo_handles, count * sizeof(u32))) {
> ret = -EFAULT;
> - DRM_DEBUG("Failed to copy in GEM handles\n");
> + drm_dbg_core(NULL, "Failed to copy in GEM handles\n");
Passing NULL here is somewhat unfortunate. I think you could pass the
dev from the callers to drm_gem_objects_lookup() and use it here. There
are only 3 cases AFAICT. [1]
[1]
https://elixir.bootlin.com/linux/v6.17-rc1/C/ident/drm_gem_objects_lookup
Best regards
Thomas
> goto out;
> }
>
> diff --git a/drivers/gpu/drm/drm_gem_dma_helper.c b/drivers/gpu/drm/drm_gem_dma_helper.c
> index 4f0320df858f..a507cf517015 100644
> --- a/drivers/gpu/drm/drm_gem_dma_helper.c
> +++ b/drivers/gpu/drm/drm_gem_dma_helper.c
> @@ -582,7 +582,7 @@ drm_gem_dma_prime_import_sg_table_vmap(struct drm_device *dev,
>
> ret = dma_buf_vmap_unlocked(attach->dmabuf, &map);
> if (ret) {
> - DRM_ERROR("Failed to vmap PRIME buffer\n");
> + drm_err(dev, "Failed to vmap PRIME buffer\n");
> return ERR_PTR(ret);
> }
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
next prev parent reply other threads:[~2025-08-18 7:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 15:26 [PATCH] gpu/drm: Replace the deprecated logging functions in drm_gem* files Athul Raj Kollareth
2025-08-18 7:09 ` Thomas Zimmermann [this message]
2025-08-18 19:20 ` [PATCH v2] drm: Replace the deprecated DRM_* logging macros in gem helper files Athul Raj Kollareth
2025-08-18 19:42 ` Michal Wajdeczko
2025-08-19 11:16 ` Athul Raj Kollareth
2025-08-19 12:11 ` [PATCH v3] " Athul Raj Kollareth
2025-08-19 20:14 ` Michal Wajdeczko
2025-08-20 14:55 ` Athul Raj Kollareth
2025-08-20 15:04 ` [PATCH v4] " Athul Raj Kollareth
2025-08-20 8:48 ` [PATCH v2] " Thomas Zimmermann
[not found] ` <CAPZGEKyhn1LLZQ7z04_u6pjTf9Uqy+ycH4t7xYMRe5dDR9Vg2Q@mail.gmail.com>
2025-08-19 10:57 ` Athul Raj Kollareth
2025-08-20 8:50 ` Thomas Zimmermann
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=f94151b4-893a-4758-a118-153076a20d3c@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=krathul3152@gmail.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.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