From: Thomas Zimmermann <tzimmermann@suse.de>
To: Siddh Raman Pant <code@siddh.me>
Cc: maarten lankhorst <maarten.lankhorst@linux.intel.com>,
maxime ripard <mripard@kernel.org>,
david airlie <airlied@gmail.com>, daniel vetter <daniel@ffwll.ch>,
dri-devel <dri-devel@lists.freedesktop.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm: Replace DRM_INFO() with pr_info()
Date: Mon, 19 Dec 2022 17:15:00 +0100 [thread overview]
Message-ID: <66e0d14a-bc95-72d6-b1a7-0337a9540579@suse.de> (raw)
In-Reply-To: <1852b054022.16e87c6b116450.6116081892972417758@siddh.me>
[-- Attachment #1.1: Type: text/plain, Size: 1729 bytes --]
Hi
Am 19.12.22 um 16:34 schrieb Siddh Raman Pant:
> On Mon, 19 Dec 2022 20:27:45 +0530, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 19.12.22 um 15:23 schrieb Siddh Raman Pant:
>>> Line 536 of drm_print.h says DRM_INFO() is deprecated
>>> in favor of pr_info().
>>
>> That's a misleading comment. DRM_INFO() is deprecated for drm_info().
>> pr_info() et al is only to be used of you don't have a dev pointer.
>>
>> Best regards
>> Thomas
>
> Maybe you are confusing it with DRM_DEV_INFO? It takes the dev pointer,
> and is indeed told to be deprecated in favour of drm_info() in the
> comments (see line 394).
>
> DRM_INFO is a separate macro for printing stuff, and does not take the
> dev pointer. They seem to be early wrappers for printk, I guess when
> pr_info did not exist. And all they do different from pr_info is to add
> DRM_NAME (which seems to be just "drm") in front of the string.
The DRM_ print macros in capital letters are deprecated AFAIK. In cases
where a dev pointer is available, using drm_info() et al. is preferred
over pr_info().
In the context of your patch, you should use drm_info() in
drm_client_target_cloned(), as is gets a dev pointer as its first
argument. In most the other cases from your patch, you can get the dev
pointer from connector->dev.
The final case, drm_legacy_pci_exit(), there's no dev pointer, so you
can use pr_info() there. I'd remove '[drm]' from the string. We don't
use this much elsewhere.
Best regards
Thomas
>
> Thanks,
> Siddh
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
prev parent reply other threads:[~2022-12-19 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 14:23 Siddh Raman Pant
2022-12-19 14:57 ` Thomas Zimmermann
2022-12-19 15:34 ` Siddh Raman Pant
2022-12-19 16:15 ` Thomas Zimmermann [this message]
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=66e0d14a-bc95-72d6-b1a7-0337a9540579@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=code@siddh.me \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.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
all inboxes | Powered by JetHome®