From: Joe Perches <joe@perches.com> To: Jim Cromie <jim.cromie@gmail.com>, 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, linux-kernel@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: jbaron@akamai.com Subject: Re: [RFC PATCH v2 1/4] drm_print.h: rewrap __DRM_DEFINE_DBG_RATELIMITED macro Date: Sun, 11 Jul 2021 09:17:21 -0700 [thread overview] Message-ID: <e9f8186b3b96ba909f156fd750ba0aaf3d60a5fa.camel@perches.com> (raw) In-Reply-To: <20210711055003.528167-2-jim.cromie@gmail.com> 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. if (drm_debug_enabled(DRM_UT_ ## category) && \ __ratelimit(&rs_)) \
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com> To: Jim Cromie <jim.cromie@gmail.com>, 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, linux-kernel@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: jbaron@akamai.com Subject: Re: [Intel-gfx] [RFC PATCH v2 1/4] drm_print.h: rewrap __DRM_DEFINE_DBG_RATELIMITED macro Date: Sun, 11 Jul 2021 09:17:21 -0700 [thread overview] Message-ID: <e9f8186b3b96ba909f156fd750ba0aaf3d60a5fa.camel@perches.com> (raw) In-Reply-To: <20210711055003.528167-2-jim.cromie@gmail.com> 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. if (drm_debug_enabled(DRM_UT_ ## category) && \ __ratelimit(&rs_)) \ _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-07-11 16:17 UTC|newest] Thread overview: 25+ 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 ` [Intel-gfx] " Jim Cromie 2021-07-11 5:49 ` 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 5:49 ` [Intel-gfx] " Jim Cromie 2021-07-11 5:49 ` Jim Cromie 2021-07-11 16:17 ` Joe Perches [this message] 2021-07-11 16:17 ` [Intel-gfx] " Joe Perches 2021-07-11 16:17 ` Joe Perches 2021-07-13 1:38 ` jim.cromie 2021-07-13 1:38 ` [Intel-gfx] " jim.cromie 2021-07-13 1:38 ` jim.cromie 2021-07-11 5:50 ` [RFC PATCH v2 2/4] drm: fixup comment spelling Jim Cromie 2021-07-11 5:50 ` [Intel-gfx] " Jim Cromie 2021-07-11 5:50 ` 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 ` [Intel-gfx] " Jim Cromie 2021-07-11 5:50 ` 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 2021-07-11 5:50 ` [Intel-gfx] " Jim Cromie 2021-07-11 5:50 ` Jim Cromie 2021-07-12 14:14 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Allow using dyndbg to replace drm_debug_enabled Patchwork 2021-07-12 14:17 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork 2021-07-12 14:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2021-07-12 17:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=e9f8186b3b96ba909f156fd750ba0aaf3d60a5fa.camel@perches.com \ --to=joe@perches.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=jim.cromie@gmail.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: linkBe 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.