drm/i915/dp: make link rate printing prettier
authorJani Nikula <jani.nikula@intel.com>
Mon, 18 May 2015 13:01:45 +0000 (16:01 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 20 May 2015 09:26:06 +0000 (11:26 +0200)
Turn

    [drm:intel_dp_print_rates] source rates: 162000,270000,540000,
    [drm:intel_dp_print_rates] sink rates: 162000,270000,
    [drm:intel_dp_print_rates] common rates: 162000,270000,

into

    [drm:intel_dp_print_rates] source rates: 162000, 270000, 540000
    [drm:intel_dp_print_rates] sink rates: 162000, 270000
    [drm:intel_dp_print_rates] common rates: 162000, 270000

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dp.c

index f99cca80867c28e4f93262ba4554a98fab9e0b85..6e9f14ef2d2d95358eb0a56c985a4d2930576ea9 100644 (file)
@@ -1269,7 +1269,7 @@ static void snprintf_int_array(char *str, size_t len,
        str[0] = '\0';
 
        for (i = 0; i < nelem; i++) {
-               int r = snprintf(str, len, "%d,", array[i]);
+               int r = snprintf(str, len, "%s%d", i ? ", " : "", array[i]);
                if (r >= len)
                        return;
                str += r;