From patchwork Wed Jan 13 14:49:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 12016965 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 449B9C433E6 for ; Wed, 13 Jan 2021 14:50:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F342123619 for ; Wed, 13 Jan 2021 14:50:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F342123619 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E55EE6EA58; Wed, 13 Jan 2021 14:50:34 +0000 (UTC) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by gabe.freedesktop.org (Postfix) with ESMTPS id 89DFA6EA51 for ; Wed, 13 Jan 2021 14:50:32 +0000 (UTC) Received: by mail-wm1-x331.google.com with SMTP id h17so1654152wmq.1 for ; Wed, 13 Jan 2021 06:50:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UBertLrO50IMon3TZ4gj0CSxI3Yqy8ksl/8MP2cv2iw=; b=akpdEhMJh2ARCHyoNNx9VPJuhAoo9/Y4QVqEYnbUJ0Hy/4xwAFnitREVMt08+c+3Qu Kc2u8TwF4caPKUyn75DQBoHuu3wGDMO0r2V3p0Yo+d9smk9uBH9HBLge1hMCGnifQUR9 JjsszdKmG43arb7E46nkyyLFqd/tXDE7Y7P9jv3oeKYHpCIPG8OOt+aQ4sR1/nWloE2f 51Wwa7J/1t45aqUrswNJxn0kk2k4+oGZ23ac7biP9+idnJfOmRnbqPHH2PwdliX+83OH bnrAP/8D7ucxpARodtDBgI/9O7O5s2Vfm3AXS7vGGur65NmXvY4JTtIa3YxDSPJQGQVk BZgw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=UBertLrO50IMon3TZ4gj0CSxI3Yqy8ksl/8MP2cv2iw=; b=AXqxA70rPPA9N+DrzEHa2+g4L0cQ1lKnteuD4VHVb+IYvXgnQOh1tA3AtEfRd10HEv dF5q0Ie/rUDlM/IMcfG3fP4cFfDvq6Uwq03ouEty8jFX8o91pBE3wXxzE3SmPRXqtOEq 74fa+xLVT5y+yAxEIvUDSt9dhMM9crhZf5UIX9l5QX5n2KbqdTfB5MdSnCBI5NMMId/w D9Im+hjqNVhrByt6oQ7qtPwOJpsDJJEcQciQLDjLYnMwGJHSUlVeSiXeiVqtV836tKAL AXVmvtVXRYLahiiWvjBLReirVKWc93aIruFtyK4mwMjvNLpIrDRDYB0ANZyEqDI7wS1p 5UOw== X-Gm-Message-State: AOAM530117+2buHq35+iCZmbkFrw3uhcobj5zGAebt9U25/4e0Sx+dxe u9f429p4UYg6RJiJAtmsP4nrrQ== X-Google-Smtp-Source: ABdhPJw509pJdXHv0jOqPq8GOcIPKK4q+ka5nv3ec9nw6ylQAnAdVKzrPJgraDgus3zDqa2Oa+9RdA== X-Received: by 2002:a7b:c10e:: with SMTP id w14mr2520321wmi.161.1610549431282; Wed, 13 Jan 2021 06:50:31 -0800 (PST) Received: from dell.default ([91.110.221.229]) by smtp.gmail.com with ESMTPSA id t188sm3273433wmf.9.2021.01.13.06.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 06:50:30 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 11/31] video: fbdev: sis: init: Remove four unused variables Date: Wed, 13 Jan 2021 14:49:49 +0000 Message-Id: <20210113145009.1272040-12-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210113145009.1272040-1-lee.jones@linaro.org> References: <20210113145009.1272040-1-lee.jones@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Thomas Winischhofer , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/video/fbdev/sis/init.c: In function ‘SiS_SetCRT1ModeRegs’: drivers/video/fbdev/sis/init.c:2651:49: warning: variable ‘resindex’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/sis/init.c: In function ‘SiS_Generic_ConvertCRData’: drivers/video/fbdev/sis/init.c:3544:19: warning: variable ‘A’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/sis/init.c:3542:34: warning: variable ‘VBS’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/sis/init.c:3541:34: warning: variable ‘HBS’ set but not used [-Wunused-but-set-variable] Cc: Thomas Winischhofer Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Lee Jones --- drivers/video/fbdev/sis/init.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c index fde27feae5d0c..4510272ad297a 100644 --- a/drivers/video/fbdev/sis/init.c +++ b/drivers/video/fbdev/sis/init.c @@ -2648,7 +2648,7 @@ static void SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RRTI) { - unsigned short data, infoflag = 0, modeflag, resindex; + unsigned short data, infoflag = 0, modeflag; #ifdef CONFIG_FB_SIS_315 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; unsigned short data2, data3; @@ -2659,7 +2659,7 @@ SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo, if(SiS_Pr->UseCustomMode) { infoflag = SiS_Pr->CInfoFlag; } else { - resindex = SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex); + SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex); if(ModeNo > 0x13) { infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag; } @@ -3538,16 +3538,15 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, struct fb_var_screeninfo *var, bool writeres ) { - unsigned short HRE, HBE, HRS, HBS, HDE, HT; - unsigned short VRE, VBE, VRS, VBS, VDE, VT; + unsigned short HRE, HBE, HRS, HDE, HT; + unsigned short VRE, VBE, VRS, VDE, VT; unsigned char sr_data, cr_data, cr_data2; - int A, B, C, D, E, F, temp; + int B, C, D, E, F, temp; sr_data = crdata[14]; /* Horizontal total */ HT = crdata[0] | ((unsigned short)(sr_data & 0x03) << 8); - A = HT + 5; /* Horizontal display enable end */ HDE = crdata[1] | ((unsigned short)(sr_data & 0x0C) << 6); @@ -3557,9 +3556,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, HRS = crdata[4] | ((unsigned short)(sr_data & 0xC0) << 2); F = HRS - E - 3; - /* Horizontal blank start */ - HBS = crdata[2] | ((unsigned short)(sr_data & 0x30) << 4); - sr_data = crdata[15]; cr_data = crdata[5]; @@ -3593,7 +3589,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, ((unsigned short)(cr_data & 0x01) << 8) | ((unsigned short)(cr_data & 0x20) << 4) | ((unsigned short)(sr_data & 0x01) << 10); - A = VT + 2; /* Vertical display enable end */ VDE = crdata[10] | @@ -3611,12 +3606,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, cr_data2 = (crdata[16] & 0x01) << 5; - /* Vertical blank start */ - VBS = crdata[11] | - ((unsigned short)(cr_data & 0x08) << 5) | - ((unsigned short)(cr_data2 & 0x20) << 4) | - ((unsigned short)(sr_data & 0x04) << 8); - /* Vertical blank end */ VBE = crdata[12] | ((unsigned short)(sr_data & 0x10) << 4); temp = VBE - ((E - 1) & 511);