From: Damien Lespiau Subject: [PATCH i-g-t 15/43] kms_rotation_crc: Fix style issue: single statement conditionals Date: Thu, 10 Jul 2014 19:00:16 +0100 Message-ID: <1405015244-11370-16-git-send-email-damien.lespiau@intel.com> References: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 1329C6E057 for ; Thu, 10 Jul 2014 11:01:29 -0700 (PDT) In-Reply-To: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 9c194ce..eb63326 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -187,9 +187,9 @@ static bool check_plane_type(int drm_fd, uint32_t plane_id, uint32_t type) drmModePropertyPtr prop = drmModeGetProperty(drm_fd, props->props[i]); if (strcmp(prop->name, "type") == 0) { - if (props->prop_values[i] == type) { + if (props->prop_values[i] == type) return true; - } + igt_info("Didn't find the requested type:%u\n", (unsigned int)props->prop_values[i]); } } @@ -283,12 +283,10 @@ static void cleanup_crtc(data_t *data, igt_output_t *output) igt_remove_fb(data->gfx_fd, &data->fb); - if (data->type == DRM_PLANE_TYPE_PRIMARY) { + if (data->type == DRM_PLANE_TYPE_PRIMARY) plane = igt_output_get_plane(output, IGT_PLANE_PRIMARY); - } - else if (data->type == DRM_PLANE_TYPE_OVERLAY) { + else if (data->type == DRM_PLANE_TYPE_OVERLAY) plane = igt_output_get_plane(output, IGT_PLANE_2); - } if (plane != NULL) igt_plane_set_fb(plane, NULL); -- 1.8.3.1