On Tue, Oct 04, 2016 at 03:42:57PM +0300, Joonas Lahtinen wrote:
>  #define PRINT_S(name) "%s"
> -#define SEP_EMPTY
> -#define PRINT_FLAG(name) info->name ? #name "," : ""
> -#define SEP_COMMA ,
> +#define PRINT_FLAG(name) info->name ? #name "," : "",
>       DRM_DEBUG_DRIVER("i915 device info: gen=%i, pciid=0x%04x rev=0x%02x 
> flags="
> -                      DEV_INFO_FOR_EACH_FLAG(PRINT_S, SEP_EMPTY),
> +                      DEV_INFO_FOR_EACH_FLAG(PRINT_S) "%s",
>                        info->gen,
>                        dev_priv->drm.pdev->device,
>                        dev_priv->drm.pdev->revision,
> -                      DEV_INFO_FOR_EACH_FLAG(PRINT_FLAG, SEP_COMMA));
> +                      DEV_INFO_FOR_EACH_FLAG(PRINT_FLAG)
> +                      "");

Why did we need the trailing fmt + arg? Oh. PRINT_FLAG has the trailing
'.' so needs a sentinel.

Reviewed-by: Chris Wilson <[email protected]>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to