[PATCH] drm/print: Delete a few unused shouting macros
Daniel Vetter
daniel at ffwll.ch
Fri Feb 14 16:25:54 UTC 2020
On Fri, Feb 14, 2020 at 11:13:23AM +0200, Jani Nikula wrote:
> On Fri, 14 Feb 2020, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> > We want to go over to the new lowercase ones, encourage that a bit
> > more.
> >
> > Cc: Jani Nikula <jani.nikula at intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> > ---
> > drivers/gpu/drm/drm_managed.c | 21 +++++++++++++++++++++
>
> Oops?
Indeed, tiny sneak peek at what I'm working on ... you mentioning devm_
yesterday was a very successful nerd snipe :-)
>
> > include/drm/drm_print.h | 26 --------------------------
>
> Acked-by: Jani Nikula <jani.nikula at intel.com>
>
> for this file.
Wrong hunk dropped and applied, thanks for taking a look.
-Daniel
>
> > 2 files changed, 21 insertions(+), 26 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_managed.c b/drivers/gpu/drm/drm_managed.c
> > index ea49071b16ee..7d4827b79806 100644
> > --- a/drivers/gpu/drm/drm_managed.c
> > +++ b/drivers/gpu/drm/drm_managed.c
> > @@ -38,4 +38,25 @@ struct drmres {
> > u8 __aligned(ARCH_KMALLOC_MINALIGN) data[];
> > };
> >
> > +static __always_inline struct drmres * alloc_dr(drmres_release_t release,
> > + size_t size, gfp_t gfp, int nid)
> > +{
> > + size_t tot_size;
> > + struct drmres *dr;
> > +
> > + /* We must catch any near-SIZE_MAX cases that could overflow. */
> > + if (unlikely(check_add_overflow(sizeof(*dr), size, &tot_size)))
> > + return NULL;
> > +
> > + dr = kmalloc_node_track_caller(tot_size, gfp, nid);
> > + if (unlikely(!dr))
> > + return NULL;
> > +
> > + memset(dr, 0, offsetof(struct drmres, data));
> > +
> > + INIT_LIST_HEAD(&dr->node.entry);
> > + dr->node.release = release;
> > + return dr;
> > +}
> > +
> >
> > diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> > index 894a0b9437e2..fd6ba2532f50 100644
> > --- a/include/drm/drm_print.h
> > +++ b/include/drm/drm_print.h
> > @@ -382,14 +382,6 @@ void drm_dev_dbg(const struct device *dev, enum drm_debug_category category,
> > drm_dev_dbg(dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
> > #define DRM_DEV_DEBUG_KMS(dev, fmt, ...) \
> > drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
> > -#define DRM_DEV_DEBUG_PRIME(dev, fmt, ...) \
> > - drm_dev_dbg(dev, DRM_UT_PRIME, fmt, ##__VA_ARGS__)
> > -#define DRM_DEV_DEBUG_ATOMIC(dev, fmt, ...) \
> > - drm_dev_dbg(dev, DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)
> > -#define DRM_DEV_DEBUG_VBL(dev, fmt, ...) \
> > - drm_dev_dbg(dev, DRM_UT_VBL, fmt, ##__VA_ARGS__)
> > -#define DRM_DEV_DEBUG_DP(dev, fmt, ...) \
> > - drm_dev_dbg(dev, DRM_UT_DP, fmt, ## __VA_ARGS__)
> >
> > #define _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, category, fmt, ...) \
> > ({ \
> > @@ -406,18 +398,9 @@ void drm_dev_dbg(const struct device *dev, enum drm_debug_category category,
> > * @dev: device pointer
> > * @fmt: printf() like format string.
> > */
> > -#define DRM_DEV_DEBUG_RATELIMITED(dev, fmt, ...) \
> > - _DEV_DRM_DEFINE_DEBUG_RATELIMITED(dev, DRM_UT_CORE, \
> > - fmt, ##__VA_ARGS__)
> > -#define DRM_DEV_DEBUG_DRIVER_RATELIMITED(dev, fmt, ...) \
> > - _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, DRM_UT_DRIVER, \
> > - fmt, ##__VA_ARGS__)
> > #define DRM_DEV_DEBUG_KMS_RATELIMITED(dev, fmt, ...) \
> > _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, DRM_UT_KMS, \
> > fmt, ##__VA_ARGS__)
> > -#define DRM_DEV_DEBUG_PRIME_RATELIMITED(dev, fmt, ...) \
> > - _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, DRM_UT_PRIME, \
> > - fmt, ##__VA_ARGS__)
> >
> > /*
> > * struct drm_device based logging
> > @@ -541,18 +524,9 @@ void __drm_err(const char *format, ...);
> > __drm_dbg(DRM_UT_DP, fmt, ## __VA_ARGS__)
> >
> >
> > -#define DRM_DEBUG_RATELIMITED(fmt, ...) \
> > - DRM_DEV_DEBUG_RATELIMITED(NULL, fmt, ##__VA_ARGS__)
> > -
> > -#define DRM_DEBUG_DRIVER_RATELIMITED(fmt, ...) \
> > - DRM_DEV_DEBUG_DRIVER_RATELIMITED(NULL, fmt, ##__VA_ARGS__)
> > -
> > #define DRM_DEBUG_KMS_RATELIMITED(fmt, ...) \
> > DRM_DEV_DEBUG_KMS_RATELIMITED(NULL, fmt, ##__VA_ARGS__)
> >
> > -#define DRM_DEBUG_PRIME_RATELIMITED(fmt, ...) \
> > - DRM_DEV_DEBUG_PRIME_RATELIMITED(NULL, fmt, ##__VA_ARGS__)
> > -
> > /*
> > * struct drm_device based WARNs
> > *
>
> --
> Jani Nikula, Intel Open Source Graphics Center
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list