From patchwork Sat Jul 7 23:22:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10512971 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 60D09603D7 for ; Sat, 7 Jul 2018 23:22:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5056A288E8 for ; Sat, 7 Jul 2018 23:22:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41C98288EC; Sat, 7 Jul 2018 23:22:58 +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 0795C288E8 for ; Sat, 7 Jul 2018 23:22:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 802736E358; Sat, 7 Jul 2018 23:22:57 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 312BC6E34B; Sat, 7 Jul 2018 23:22:56 +0000 (UTC) Received: by mail-qk0-x244.google.com with SMTP id c192-v6so8082269qkg.12; Sat, 07 Jul 2018 16:22:56 -0700 (PDT) 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=yax58hqfSzoPLsix3xaARqzGE0wr8CwFLdTEDrju4Ww=; b=EDafPBSrRilbEbfaol+Ce6CmON0SkLy97pquF1pI5m4KwxFSBwM48iVo8SsnyK75ew duf0P1SMZdtl2vGaHIwuCBDqsmFqpbxMK/V1n+1VnC+F9lU+kIYUcUCyjE33rR3YVBoN ujxpR9vhfTLcLLasaC5XIY76qiTyHmWCS2A31/Q7EGUfW0c5Yc6DsyJQ1Lgz9rj0IXyW o2rXD67NGvQO1jiTAkyae23jPoy7I+Tz5Wem+9dPMtyu3LVZ078jakr1WAx2LW63Adbe TiPTvXwX9eOtBN0sTGZmUSD+JUazur3Z8r4/2HBtLxkfvKPedMT6rhO+AU60/rzIuAEA mloA== X-Gm-Message-State: APt69E3db/GV1aBrWq20N2Apz0IAmrzc3GVKXxo63hNKrv/Mih02TvID UuKkEPfqQ7qEf5iLYjhlkII= X-Google-Smtp-Source: AAOMgpf1vcntszm96SetUAR6ytRxMv+cB6Dl1fdv40ZC/DJQ1t09JNnwUyHjAT5wuQchbBUH6u98/A== X-Received: by 2002:ae9:c002:: with SMTP id u2-v6mr13024596qkk.391.1531005775380; Sat, 07 Jul 2018 16:22:55 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id 25-v6sm1378150qtt.45.2018.07.07.16.22.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Jul 2018 16:22:54 -0700 (PDT) Date: Sat, 7 Jul 2018 20:22:52 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: <40642b983962135de1e7a13a25c63e6803c22410.1531005542.git.rodrigosiqueiramelo@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180622 Subject: [Intel-gfx] [PATCH i-g-t 3/7] Fix comparison that always evaluates to false 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 This commit fix the GCC warning: warning: bitwise comparison always evaluates to false [-Wtautological-compare] } else if ((val & DPLLB_MODE_LVDS) == DPLLB_MODE_DAC_SERIAL) { The first comparison already checks DPLLB_MODE_LVDS, in this sense, the second 'if' condition always will be false. This commit changes the comparison to DPLLB_MODE_DAC_SERIAL. Signed-off-by: Rodrigo Siqueira --- tools/intel_reg_decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/intel_reg_decode.c b/tools/intel_reg_decode.c index f3c7d74a..5a632e09 100644 --- a/tools/intel_reg_decode.c +++ b/tools/intel_reg_decode.c @@ -1277,7 +1277,7 @@ DEBUGSTRING(ironlake_debug_pch_dpll) p2 = "Div 7"; else p2 = "Div 14"; - } else if ((val & DPLLB_MODE_LVDS) == DPLLB_MODE_DAC_SERIAL) { + } else if ((val & DPLLB_MODE_DAC_SERIAL) == DPLLB_MODE_DAC_SERIAL) { mode = "Non-LVDS"; if (val & DPLL_DAC_SERIAL_P2_CLOCK_DIV_5) p2 = "Div 5";