linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jim.cromie@gmail.com
To: Joe Perches <joe@perches.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	Zhi Wang <zhi.a.wang@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	dri-devel@lists.freedesktop.org,
	LKML <linux-kernel@vger.kernel.org>,
	intel-gvt-dev@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org, Jason Baron <jbaron@akamai.com>
Subject: Re: [RFC PATCH v2 1/4] drm_print.h: rewrap __DRM_DEFINE_DBG_RATELIMITED macro
Date: Mon, 12 Jul 2021 19:38:25 -0600	[thread overview]
Message-ID: <CAJfuBxyRvPbjBQ0dVL5g9SL=hRgKxNKaadb5cxeEoEWt56k-Gg@mail.gmail.com> (raw)
In-Reply-To: <e9f8186b3b96ba909f156fd750ba0aaf3d60a5fa.camel@perches.com>

On Sun, Jul 11, 2021 at 10:17 AM Joe Perches <joe@perches.com> wrote:
>
> On Sat, 2021-07-10 at 23:49 -0600, Jim Cromie wrote:
> > whitespace only, to diff-minimize a later commit.
> > no functional changes
> []
> > diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> []
> > @@ -524,19 +524,24 @@ void __drm_err(const char *format, ...);
> >  #define DRM_DEBUG_DP(fmt, ...)                                               \
> >       __drm_dbg(DRM_UT_DP, fmt, ## __VA_ARGS__)
> >
> >
> > -#define __DRM_DEFINE_DBG_RATELIMITED(category, drm, fmt, ...)                                        \
> > -({                                                                                           \
> > -     static DEFINE_RATELIMIT_STATE(rs_, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST);\
> > -     const struct drm_device *drm_ = (drm);                                                  \
> > -                                                                                             \
> > -     if (drm_debug_enabled(DRM_UT_ ## category) && __ratelimit(&rs_))                        \
> > -             drm_dev_printk(drm_ ? drm_->dev : NULL, KERN_DEBUG, fmt, ## __VA_ARGS__);       \
> > +#define __DRM_DEFINE_DBG_RATELIMITED(category, drm, fmt, ...)                \
> > +({                                                                   \
> > +     static DEFINE_RATELIMIT_STATE(rs_,                              \
> > +                                   DEFAULT_RATELIMIT_INTERVAL,       \
> > +                                   DEFAULT_RATELIMIT_BURST);         \
> > +     const struct drm_device *drm_ = (drm);                          \
> > +                                                                     \
> > +     if (drm_debug_enabled(DRM_UT_ ## category)                      \
> > +         && __ratelimit(&rs_))                                       \
>
> Though I don't really see the need for the change, the typical style
> has the logical continuation at the end of the test.
>

yes I caught that late, old habit, hard to break.
That if-statement is altered as part of HEAD+2
    drm: RFC add choice to use dynamic debug in drm-debug

which replaces drm_dev_printk with drm_dev_dbg
(which calls pr_debug in DRM_USE_DYNAMIC_DEBUG)


>         if (drm_debug_enabled(DRM_UT_ ## category) &&                   \
>             __ratelimit(&rs_))                                          \
>
>

  reply	other threads:[~2021-07-13  1:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-11  5:49 [RFC PATCH v2 0/4] Allow using dyndbg to replace drm_debug_enabled Jim Cromie
2021-07-11  5:49 ` [RFC PATCH v2 1/4] drm_print.h: rewrap __DRM_DEFINE_DBG_RATELIMITED macro Jim Cromie
2021-07-11 16:17   ` Joe Perches
2021-07-13  1:38     ` jim.cromie [this message]
2021-07-11  5:50 ` [RFC PATCH v2 2/4] drm: fixup comment spelling Jim Cromie
2021-07-11  5:50 ` [RFC PATCH v2 3/4] drm: RFC add choice to use dynamic debug in drm-debug Jim Cromie
2021-07-11  5:50 ` [RFC PATCH v2 4/4] i915: map gvt pr_debug categories to bits in parameters/debug_gvt Jim Cromie

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='CAJfuBxyRvPbjBQ0dVL5g9SL=hRgKxNKaadb5cxeEoEWt56k-Gg@mail.gmail.com' \
    --to=jim.cromie@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jbaron@akamai.com \
    --cc=joe@perches.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=tzimmermann@suse.de \
    --cc=zhenyuw@linux.intel.com \
    --cc=zhi.a.wang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).