tdm_helper: clean up tdm_helper_get_display_information() 98/100498/2
authorYoungJun Cho <yj44.cho@samsung.com>
Mon, 28 Nov 2016 09:08:21 +0000 (18:08 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 28 Nov 2016 09:56:03 +0000 (01:56 -0800)
This patch cleans up tdm_helper_get_display_information()
to use %u when TDM_SNPRINTF() uses unsigned integer.

Change-Id: I43c50dcced98fc9993dd228a229c575d4c195d7b
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
src/tdm_helper.c

index 95dbe7f..706a479 100644 (file)
@@ -753,7 +753,7 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len)
        TDM_SNPRINTF(reply, len, "idx   maker   model   name   type   status   dpms   subpixel   align_w   min   max   phy(mm)\n");
        TDM_SNPRINTF(reply, len, "--------------------------------------------------------------------------------------------\n");
        LIST_FOR_EACH_ENTRY(private_output, &private_display->output_list, link) {
-               TDM_SNPRINTF(reply, len, "%d   %s   %s   %s   %s   %s   %s   %d   %d   %dx%d   %dx%d   %dx%d\n",
+               TDM_SNPRINTF(reply, len, "%d   %s   %s   %s   %s   %s   %s   %u   %d   %dx%d   %dx%d   %ux%u\n",
                                         private_output->index, private_output->caps.maker,
                                         private_output->caps.model, private_output->caps.name,
                                         tdm_conn_str(private_output->caps.type),
@@ -767,7 +767,7 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len)
                                         TDM_FRONT_VALUE(private_output->caps.max_h),
                                         private_output->caps.mmWidth, private_output->caps.mmHeight);
 
-               TDM_SNPRINTF(reply, len, "\t%d modes:\n", private_output->caps.mode_count);
+               TDM_SNPRINTF(reply, len, "\t%u modes:\n", private_output->caps.mode_count);
 
                if (private_output->caps.mode_count > 0) {
                        const tdm_output_mode *current_mode = NULL;
@@ -779,7 +779,7 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len)
                        TDM_SNPRINTF(reply, len, "\t\t name refresh (Hz) clk hdisp hss hse htot vdisp vss vse vtot vscan\n");
                        for (i = 0; i < private_output->caps.mode_count; i++) {
                                char *current = (current_mode == private_output->caps.modes + i) ? "*" : " ";
-                               TDM_SNPRINTF(reply, len, "\t\t%s%s %d %d %d %d %d %d %d %d %d %d %d ",
+                               TDM_SNPRINTF(reply, len, "\t\t%s%s %u %u %u %u %u %u %u %u %u %u %u ",
                                                         current,
                                                         private_output->caps.modes[i].name,
                                                         private_output->caps.modes[i].vrefresh,
@@ -810,7 +810,7 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len)
                                                                                                           private_output->caps.props[i].id,
                                                                                                           &value);
                                TDM_DBG_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, unlock);
-                               TDM_SNPRINTF(reply, len, "\t\t%s\t%d\t%d\n",
+                               TDM_SNPRINTF(reply, len, "\t\t%s\t%u\t%u\n",
                                                         private_output->caps.props[i].name,
                                                         private_output->caps.props[i].id,
                                                         value.u32);
@@ -849,7 +849,7 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len)
                                if (info.src_config.format)
                                        format = (info.src_config.format)?:format;
 
-                               TDM_SNPRINTF(reply, len, "%d   %d   %d   %p   %c%c%c%c   %dx%d   %dx%d+%d+%d   %dx%d+%d+%d   %s\n",
+                               TDM_SNPRINTF(reply, len, "%d   %d   %d   %p   %c%c%c%c   %ux%u   %ux%u+%u+%u   %ux%u+%u+%u   %s\n",
                                                         private_layer->index,
                                                         private_output->index,
                                                         private_layer->caps.zpos,
@@ -880,7 +880,7 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len)
                                TDM_SNPRINTF(reply, len, "\n");
                        }
 
-                       TDM_SNPRINTF(reply, len, "\t%d properties:\n", private_layer->caps.prop_count);
+                       TDM_SNPRINTF(reply, len, "\t%u properties:\n", private_layer->caps.prop_count);
                        if (private_layer->caps.prop_count > 0) {
                                TDM_SNPRINTF(reply, len, "\t\tname\tidx\tvalue\n");
                                for (i = 0; i < private_layer->caps.prop_count; i++) {
@@ -890,7 +890,7 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len)
                                                                                                                 private_layer->caps.props[i].id,
                                                                                                                 &value);
                                        TDM_DBG_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, unlock);
-                                       TDM_SNPRINTF(reply, len, "\t\t%s\t%d\t%d\n",
+                                       TDM_SNPRINTF(reply, len, "\t\t%s\t%u\t%u\n",
                                                                 private_layer->caps.props[i].name,
                                                                 private_layer->caps.props[i].id,
                                                                 value.u32);
@@ -925,7 +925,7 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len)
                        TDM_SNPRINTF(reply, len, "src(format size crop)  |  dst(format size crop)  |  transform\n");
                        TDM_SNPRINTF(reply, len, "-------------------------------------------------------------\n");
                        LIST_FOR_EACH_ENTRY(private_pp, &private_display->pp_list, link) {
-                               TDM_SNPRINTF(reply, len, "%c%c%c%c %dx%d %dx%d+%d+%d | %c%c%c%c %dx%d %dx%d+%d+%d | %s\n",
+                               TDM_SNPRINTF(reply, len, "%c%c%c%c %ux%u %ux%u+%u+%u | %c%c%c%c %ux%u %ux%u+%u+%u | %s\n",
                                                         FOURCC_STR(private_pp->info.src_config.format),
                                                         private_pp->info.src_config.size.h,
                                                         private_pp->info.src_config.size.v,
@@ -969,7 +969,7 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len)
                        TDM_SNPRINTF(reply, len, "dst(format size crop)  |  transform\n");
                        TDM_SNPRINTF(reply, len, "-----------------------------------\n");
                        LIST_FOR_EACH_ENTRY(private_capture, &private_display->capture_list, link) {
-                               TDM_SNPRINTF(reply, len, "%c%c%c%c %dx%d %dx%d+%d+%d | %s\n",
+                               TDM_SNPRINTF(reply, len, "%c%c%c%c %ux%u %ux%u+%u+%u | %s\n",
                                                         FOURCC_STR(private_capture->info.dst_config.format),
                                                         private_capture->info.dst_config.size.h,
                                                         private_capture->info.dst_config.size.v,