From: Jani Nikula <jani.nikula@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
dri-devel@lists.freedesktop.org
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: Re: [PATCH] drm/print: Kill ___drm_dbg()
Date: Thu, 16 May 2024 21:24:42 +0300 [thread overview]
Message-ID: <87h6exbonp.fsf@intel.com> (raw)
In-Reply-To: <20240516160015.2260-1-michal.wajdeczko@intel.com>
On Thu, 16 May 2024, Michal Wajdeczko <michal.wajdeczko@intel.com> wrote:
> There is no point in maintaining a separate print function, while
> there is __drm_dev_dbg() function that can work with a NULL device.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_print.c | 19 -------------------
> include/drm/drm_print.h | 8 +++-----
> 2 files changed, 3 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
> index cf2efb44722c..7e16ce7c7c7a 100644
> --- a/drivers/gpu/drm/drm_print.c
> +++ b/drivers/gpu/drm/drm_print.c
> @@ -323,25 +323,6 @@ void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
> }
> EXPORT_SYMBOL(__drm_dev_dbg);
>
> -void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...)
> -{
> - struct va_format vaf;
> - va_list args;
> -
> - if (!__drm_debug_enabled(category))
> - return;
> -
> - va_start(args, format);
> - vaf.fmt = format;
> - vaf.va = &args;
> -
> - printk(KERN_DEBUG "[" DRM_NAME ":%ps] %pV",
> - __builtin_return_address(0), &vaf);
> -
> - va_end(args);
> -}
> -EXPORT_SYMBOL(___drm_dbg);
> -
> void __drm_err(const char *format, ...)
> {
> struct va_format vaf;
> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> index 089950ad8681..6f8cb5fada41 100644
> --- a/include/drm/drm_print.h
> +++ b/include/drm/drm_print.h
> @@ -527,17 +527,15 @@ void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
> * Prefer drm_device based logging over device or prink based logging.
> */
>
> -__printf(3, 4)
> -void ___drm_dbg(struct _ddebug *desc, enum drm_debug_category category, const char *format, ...);
> __printf(1, 2)
> void __drm_err(const char *format, ...);
>
> #if !defined(CONFIG_DRM_USE_DYNAMIC_DEBUG)
> -#define __drm_dbg(cat, fmt, ...) ___drm_dbg(NULL, cat, fmt, ##__VA_ARGS__)
> +#define __drm_dbg(cat, fmt, ...) __drm_dev_dbg(NULL, NULL, cat, fmt, ##__VA_ARGS__)
> #else
> #define __drm_dbg(cat, fmt, ...) \
> - _dynamic_func_call_cls(cat, fmt, ___drm_dbg, \
> - cat, fmt, ##__VA_ARGS__)
> + _dynamic_func_call_cls(cat, fmt, __drm_dev_dbg, \
> + NULL, cat, fmt, ##__VA_ARGS__)
> #endif
>
> /* Macros to make printk easier */
--
Jani Nikula, Intel
prev parent reply other threads:[~2024-05-16 18:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 16:00 [PATCH] drm/print: Kill ___drm_dbg() Michal Wajdeczko
2024-05-16 18:24 ` Jani Nikula [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=87h6exbonp.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=michal.wajdeczko@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.