From patchwork Mon Mar 4 15:32:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837969 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 462EA14DE for ; Mon, 4 Mar 2019 15:32:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3260E2A84E for ; Mon, 4 Mar 2019 15:32:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 309D62A868; Mon, 4 Mar 2019 15:32:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DAA7B2A875 for ; Mon, 4 Mar 2019 15:32:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2723C89CF2; Mon, 4 Mar 2019 15:32:13 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by gabe.freedesktop.org (Postfix) with ESMTPS id 82E8E89CF2; Mon, 4 Mar 2019 15:32:11 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id w4so5545683qtc.1; Mon, 04 Mar 2019 07:32:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YNXizZ1AZVlNdIZaIZ9Hna5DBBH/LhKs798wEtuzrBU=; b=dwVQEDl6M+LRsKPs7VNxCVeMm6UCnY6qt6fhmy2FNXNExlwRr3WouLssZAmqHxdPpv gawXzUsAk1xHwNIMZNnb566DO+y3wb1czChqGYabBytCSEAstz2cE/smisZNEOs08/uP xYvn3Stl0MuOnnn3PVDlg2f/JZYJGMGCwG0byPgxy3QDkfhl+vWiknUc8c7RhsD57NLy MjFF8XyGIRTUjNWqBaGxRMA+mRWyYDAvtcQUPqWls46g6cOGdNpmPUSAmQRrc4AJ3Pwx kcOAzfXru8PA/jKBFjboOHLfc9n+zXCri/GEugYP8Qk10oS7AOtZK5PGFcBr68Lyd7Gc 8NMQ== X-Gm-Message-State: APjAAAVZTUw9FJF/RKc+5L95CBr2j4pcQ7TJhH2Qj64WA59Zo+1bmott mw4P3jFLFiXiLSprRf+a5A8uCAyS X-Google-Smtp-Source: APXvYqxD6Sh0by5mo7TsffiAfa7TBTQCixGVNbKXvXCv5iGuO4AxXvfgp07VgoyDu10GQWaJX9cYHA== X-Received: by 2002:aed:3988:: with SMTP id m8mr15318706qte.177.1551713530674; Mon, 04 Mar 2019 07:32:10 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id 188sm3694953qkd.67.2019.03.04.07.32.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:32:10 -0800 (PST) Date: Mon, 4 Mar 2019 12:32:08 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: References: MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20180716 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YNXizZ1AZVlNdIZaIZ9Hna5DBBH/LhKs798wEtuzrBU=; b=aBusO5k1gSVZIDBjceHLOG8+VDnbwEHyp4/tjHqdvGi6SuSM1sCsXog3pulYNEqj9w Kjxl/JGKtu+7vILIwSFApi0ZFct/rcX/3AW0QdaQjOMlxLQZVOZoaU9ezjOrF1DidCy8 pBnwn3wVnbPOpVd4F6+8X5/VOZDQk7vDqL/DwcgfJwNEWtcuaxWEzdxo2rIuD9bCSQyo 2e1u4wAPqrvF8hpg5TAKYAwX7b76/A8+akIl9URPfpf1x4JFQBXPwPQCJDBVswv5sFat +y+0s4FPY44V7ILsw27N1Lrj/BUbme5BUgDTgwH1WFTK4IDTlaLmeq4OA7L8N3DStK3h n0ow== Subject: [Intel-gfx] [PATCH i-g-t 7/7] kms_flip: Standardize return value for fb_is_bound X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP The function fb_is_bound() mix integer value with booleans for handling the return value. This commit standardizes the return value of fb_is_bound() for using only booleans. Signed-off-by: Rodrigo Siqueira Reviewed-by: Maarten Lankhorst --- tests/kms_flip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index de3ab600..abfdd363 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -947,8 +947,7 @@ static void paint_flip_mode(struct igt_fb *fb, bool odd_frame) igt_put_cairo_ctx(drm_fd, fb, cr); } -static int -fb_is_bound(struct test_output *o, int fb) +static bool fb_is_bound(struct test_output *o, int fb) { int n; @@ -958,7 +957,7 @@ fb_is_bound(struct test_output *o, int fb) }; if (drmIoctl(drm_fd, DRM_IOCTL_MODE_GETCRTC, &mode)) - return 0; + return false; if (!mode.mode_valid || mode.fb_id != fb) return false;