From patchwork Thu Sep 20 20:22:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10609181 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 1A2176CB for ; Fri, 21 Sep 2018 07:03:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09FB02DCCC for ; Fri, 21 Sep 2018 07:03:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F29592DCDA; Fri, 21 Sep 2018 07:03:52 +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 B11BE2DCCC for ; Fri, 21 Sep 2018 07:03:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 70A456E6F6; Fri, 21 Sep 2018 07:03:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 08E826E657 for ; Thu, 20 Sep 2018 20:22:29 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id s14-v6so10667382wrw.6 for ; Thu, 20 Sep 2018 13:22:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SqzKHEqvA36uyo/iuQtSZeARJdZnP1O1M9MSbuboYRo=; b=SoxmmSbhwDYL2gdlRsLGKK//f7wFf0o9Q6Q1M1We/C7HpQN2jbDWxzCxKvWarM6Rzv ReEKSHjzNvCSA4iO/sQtAhNSW4bIuQU6yf5syGkYzMSHcdGOcMv8CfdelLri9A0REjN4 YFzDrF93RFWNbtiP1Nw5LHv40T+Bhgnm6Wn7ggZqoRHEVdg2M2G4R4AG28etJLw8dKGa B3AUG4jIY6Zsb2c8udqC/3ZfWX8cVSFMyKasGZ8vFMhrVoZmYc1SAvE0Z83tA6CfLd3J Po8kYxT+hLGoNgrLohFUCDe/vkDQxEBU5nSU87tcymhOpktvxDAG/khiwp8orn1d8MjN HHsA== X-Gm-Message-State: APzg51APdrzKS52/IjYQ/RQ7Qj13FYADQCreedV/eK7rvq1RASX7A3d1 ZISbq7SubNfY9VhLWmWh698= X-Google-Smtp-Source: ANB0VdYaINmWhhQu2Uq6KOCRz0eh++07cvRevqZ2+bG3Kn0JXFTz8qOA0uR8P0J5drmT6BKuRSNRSw== X-Received: by 2002:a5d:51cf:: with SMTP id n15-v6mr36755077wrv.107.1537474947308; Thu, 20 Sep 2018 13:22:27 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id a10-v6sm3337597wrs.24.2018.09.20.13.22.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 13:22:26 -0700 (PDT) From: Nathan Chancellor To: Thomas Winischhofer , Bartlomiej Zolnierkiewicz Subject: [PATCH] video: fbdev: sis: Remove unnecessary parentheses and commented code Date: Thu, 20 Sep 2018 13:22:17 -0700 Message-Id: <20180920202217.27304-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 21 Sep 2018 07:02:47 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nathan Chancellor , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/video/fbdev/sis/init301.c:851:42: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ drivers/video/fbdev/sis/init301.c:851:42: note: remove extraneous parentheses around the comparison to silence this warning } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || ~ ^ ~ drivers/video/fbdev/sis/init301.c:851:42: note: use '=' to turn this equality comparison into an assignment } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || ^~ = 1 warning generated. Remove the parentheses and while we're at it, clean up the commented code, which has been here since the beginning of git history. Link: https://github.com/ClangBuiltLinux/linux/issues/118 Signed-off-by: Nathan Chancellor --- drivers/video/fbdev/sis/init301.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c index 27a2b72e50e8..a8fb41f1a258 100644 --- a/drivers/video/fbdev/sis/init301.c +++ b/drivers/video/fbdev/sis/init301.c @@ -848,9 +848,7 @@ SiS_PanelDelay(struct SiS_Private *SiS_Pr, unsigned short DelayTime) SiS_DDC2Delay(SiS_Pr, 0x4000); } - } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* || - (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) || - (SiS_Pr->SiS_CustomT == CUT_CLEVO1400) */ ) { /* 315 series, LVDS; Special */ + } else if (SiS_Pr->SiS_IF_DEF_LVDS == 1) { /* 315 series, LVDS; Special */ if(SiS_Pr->SiS_IF_DEF_CH70xx == 0) { PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);