[Intel-gfx] [PATCH 2/6] drm/i915: Replace the line of %s by a DEV_INFO_FOR_EACH_FLAG() invocation
Jani Nikula
jani.nikula at linux.intel.com
Tue Apr 23 09:22:40 CEST 2013
On Mon, 22 Apr 2013, Damien Lespiau <damien.lespiau at intel.com> wrote:
> This way, when adding a device flag we don't have to manually maintain
> that list.
\o/-by: and
Reviewed-by: Jani Nikula <jani.nikula at intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
> ---
> drivers/gpu/drm/i915/i915_dma.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 8ac8dd2..24b9e8b 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1445,10 +1445,12 @@ static void i915_dump_device_info(struct drm_i915_private *dev_priv)
> {
> const struct intel_device_info *info = dev_priv->info;
>
> +#define PRINT_S(name) "%s"
> +#define SEP_EMPTY
> #define PRINT_FLAG(name) info->name ? #name "," : ""
> #define SEP_COMMA ,
> DRM_DEBUG_DRIVER("i915 device info: gen=%i, pciid=0x%04x flags="
> - "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
> + DEV_INFO_FOR_EACH_FLAG(PRINT_S, SEP_EMPTY),
> info->gen,
> dev_priv->dev->pdev->device,
> DEV_INFO_FOR_EACH_FLAG(PRINT_FLAG, SEP_COMMA));
> --
> 1.8.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list