From: Daniel Vetter <daniel@ffwll.ch>
To: Wambui Karuga <wambui.karugax@gmail.com>
Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/print: add DRM_DEV_WARN macro
Date: Tue, 12 Nov 2019 19:27:05 +0100 [thread overview]
Message-ID: <20191112182705.GL23790@phenom.ffwll.local> (raw)
In-Reply-To: <20191112170909.13733-1-wambui.karugax@gmail.com>
On Tue, Nov 12, 2019 at 08:09:09PM +0300, Wambui Karuga wrote:
> Add the DRM_DEV_WARN helper macro for printing warnings
> that use device pointers in their log output format.
> DRM_DEV_WARN can replace the use of dev_warn in such cases.
>
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Can you pls include this in the patch to add the first user with rockchip?
Otherwise always a bit awkward when we add functions without callers.
lgtm otherwise.
-Daniel
> ---
> include/drm/drm_print.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> index 5b8049992c24..6ddf91c0cb29 100644
> --- a/include/drm/drm_print.h
> +++ b/include/drm/drm_print.h
> @@ -329,6 +329,15 @@ void drm_err(const char *format, ...);
> #define DRM_WARN_ONCE(fmt, ...) \
> _DRM_PRINTK(_once, WARNING, fmt, ##__VA_ARGS__)
>
> +/**
> + * Warning output.
> + *
> + * @dev: device pointer
> + * @fmt: printf() like format string.
> + */
> +#define DRM_DEV_WARN(dev, fmt, ...) \
> + drm_dev_printk(dev, KERN_WARNING, fmt, ##__VA_ARGS__)
> +
> /**
> * Error output.
> *
> --
> 2.17.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2019-11-12 18:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 17:09 Wambui Karuga
2019-11-12 18:27 ` Daniel Vetter [this message]
2019-11-13 4:38 ` Wambui Karuga
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=20191112182705.GL23790@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=sean@poorly.run \
--cc=wambui.karugax@gmail.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 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®