[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1fa87acecc7cb5329d28d42f7327742aceb04db.camel@perches.com>
Date: Thu, 23 May 2019 13:19:15 -0700
From: Joe Perches <joe@...ches.com>
To: Sebastian Reichel <sebastian.reichel@...labora.com>,
Sebastian Reichel <sre@...nel.org>,
Tomi Valkeinen <tomi.valkeinen@...com>,
Tony Lindgren <tony@...mide.com>, Pavel Machek <pavel@....cz>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: "H. Nikolaus Schaller" <hns@...delico.com>,
dri-devel@...ts.freedesktop.org, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCHv6 1/4] drm/omap: use DRM_DEBUG_DRIVER instead of CORE
On Thu, 2019-05-23 at 22:07 +0200, Sebastian Reichel wrote:
> This macro is only used by omapdrm, which should print
> debug messages using the DRIVER category instead of the
> default CORE category.
[]
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
[]
> @@ -37,8 +37,8 @@
> #include "omap_irq.h"
> #include "omap_plane.h"
>
> -#define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
> -#define VERB(fmt, ...) if (0) DRM_DEBUG(fmt, ##__VA_ARGS__) /* verbose debug */
> +#define DBG(fmt, ...) DRM_DEBUG_DRIVER(fmt"\n", ##__VA_ARGS__)
> +#define VERB(fmt, ...) if (0) DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__) /* verbose debug */
Trivia:
Strictly, this should use do { if (0) etc... } while (0)
Also, none of the VERB uses have a terminating newline
so ideally, this should be:
#define VERB(fmt, ...) do { if (0) DRM_DEBUG_DRIVER(fmt "\n", ##__VA_ARGS__); } while (0) /* verbose debug */
And VERB isn't a particularly intelligible macro name.
Maybe VDBG instead.
Powered by blists - more mailing lists