From patchwork Wed Jan 13 14:49:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 362120 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp598038jap; Wed, 13 Jan 2021 06:50:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2yq8cTQ2V1Nv70sec39wzngZwlHPCxaQj44L+cvYEn0NGaZ620XbSQ6qQigc3fAdtazqE X-Received: by 2002:a17:902:b587:b029:de:23ed:88b1 with SMTP id a7-20020a170902b587b02900de23ed88b1mr2712463pls.61.1610549440343; Wed, 13 Jan 2021 06:50:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610549440; cv=none; d=google.com; s=arc-20160816; b=uJEnQ3rH8OID6wAjvSW0OejD+l+iFBH2MlfghIKqKjZVT9QInnfJBv61lN9a/g4aTl /bSLcQkQkX7q94vpUUzuxt5qB662lNaGjB5MKEJcf+CslzXPBMUu/ZocWPjLqH0F+MqZ 5S8/OSyW23Cn4ijDhQndgb4zuflxrNhXhnylWYW0jBBSGJXZCCOL4kaNu/NOelo46jpg 6y+ZkONQ6OgQbV6tOvjzS0YWDyqTtc5kscLdwo5l4cqk4KlpKMs3LL0SYsKLJID4lSuh 1PlVA4BdYD2TXDIrbAGg3p7/2nQ7gOFf1AaFCEBq11AOKugzrooOSg46OlSd1uhXEJK8 UK5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=Po2g87EBiKvsF3C7yqZTUH9UrAHflgNM+7t3RVa2I38=; b=K4l7L0hJn0KTSMTNryIBDdtvBAEYv+X4c2J9t/ulANgebsblVrsYm2VxM6CtMRJRSj NAZ+64QEgv6P7IgnBzgsbHGE+wepWIKA8XolJqUda4BcjVvtlBmFb5pCvE6YM6hqgAoI nafUhFR/B9Wai2zpWl8mAD3Z2IPHK6pVEB3tnzx0xDkB5RTMDAYxurKIVKlQy053YONc XQUVqGDgDzbs8whRPBYYYVS3yeehYKGFrRk7Ucn3AdAtoXfov3o6ujv/EutA68EW0t4Q v22Qmlg88HDQS0kd+t+qKybDWvbZc95ruUJ+/2/20Mu0WGefR3KdezY/GY/FalzmohEm 5NaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EJcbDkfK; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id d3si2606356pjj.157.2021.01.13.06.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 06:50:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EJcbDkfK; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E48CD6EA52; Wed, 13 Jan 2021 14:50:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0FB7A6EA52 for ; Wed, 13 Jan 2021 14:50:31 +0000 (UTC) Received: by mail-wm1-x329.google.com with SMTP id y23so1857150wmi.1 for ; Wed, 13 Jan 2021 06:50:30 -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=akZkn4hii3ygwpUSWjXzvWKSUmmw5HI5L5N5wIekgQ0=; b=EJcbDkfKRG16dlT8xRjZ2F6tm3CWsp8WqmfprIForTO/9Y2JsYYNwS4yJL/okHccdL rfFTr0ZxW+4KF1FLysPYPNS/5SpSbjq6qLF+qf8QQszV05GlO7M8iQ6PEmExS8y0nIg/ sXKq7t7hD+h4zaMRifhvTSDH5Hdr8NcJnaksMh1Ba9J0+3WsIZOR3AdDg0zNFFyAxMq3 3m3VnwwWhpB/6kSBEAN7ThxVncEhpfkBGoxPJwk7xzxy9b6Nmo2FutbwW08hTxYU1W9B sx8byNENSxrpQ60i3f4xICBSBhsYi8qdXOOmXcJnE7uFyNJ8w242AIOWEoe7QKSKVv1G 7X2w== 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=akZkn4hii3ygwpUSWjXzvWKSUmmw5HI5L5N5wIekgQ0=; b=FAWR6Y4he63CstgDBB3yD1YhLmgVLqlorW4QR+yfoLpO6WBQ1iyKOFDB0zpAAzH7xr ZF6flo2dyQ8rhPrrnoPv4yWjUwEGxx+ngm1izyIyPx3IPTqT5jCtuyBn3XeNGGLynzmK eSuxnNiLej3TO2l+fSTisVviuZCdKYC/Bi/1ZWqUlUP8fl2rsEg5Y+GMucFt9ZnE7jWZ xytH8jmSoDnqOh2VuO4UEBe9o1zPZahGaZ3WuBC2Q1H/qQctvV7v4C1PzwbOEeF1eEV0 PLDGzP1Jboamhq9LZ3yyrpYvFctQjNgVDLyERRsWhlonsR4W+2kERJ0UkVVy/06A4Qg5 lGOw== X-Gm-Message-State: AOAM532Q5cYTUq4HoMRMQ3Yr3fAx/+yAAZcj4E2TMbkNTQMOLeYGV78E nrgalspcKlJgzKShYiTHHBI7og== X-Received: by 2002:a7b:c246:: with SMTP id b6mr2582589wmj.154.1610549429735; Wed, 13 Jan 2021 06:50:29 -0800 (PST) Received: from dell.default ([91.110.221.229]) by smtp.gmail.com with ESMTPSA id t188sm3273433wmf.9.2021.01.13.06.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 06:50:28 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 10/31] video: fbdev: riva: riva_hw: Remove a bunch of unused variables Date: Wed, 13 Jan 2021 14:49:48 +0000 Message-Id: <20210113145009.1272040-11-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: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Jeff Garzik , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/video/fbdev/riva/riva_hw.c: In function ‘nv10CalcArbitration’: drivers/video/fbdev/riva/riva_hw.c:849:9: warning: variable ‘pclks_2_top_fifo’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:848:43: warning: variable ‘vus_pipe’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:848:21: warning: variable ‘us_pipe’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:848:9: warning: variable ‘craw’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:846:27: warning: variable ‘vlwm’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:844:37: warning: variable ‘video_drain_rate’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:841:21: warning: variable ‘us_extra’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:840:55: warning: variable ‘vbs’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:839:25: warning: variable ‘cas’ set but not used [-Wunused-but-set-variable] Cc: Antonino Daplas Cc: Jeff Garzik Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/video/fbdev/riva/riva_hw.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/video/fbdev/riva/riva_hw.c b/drivers/video/fbdev/riva/riva_hw.c index bcf9c4b4de311..4ee63f7d84d3e 100644 --- a/drivers/video/fbdev/riva/riva_hw.c +++ b/drivers/video/fbdev/riva/riva_hw.c @@ -836,17 +836,17 @@ static void nv10CalcArbitration nv10_sim_state *arb ) { - int data, pagemiss, cas,width, video_enable, bpp; - int nvclks, mclks, pclks, vpagemiss, crtpagemiss, vbs; - int nvclk_fill, us_extra; + int data, pagemiss, width, video_enable, bpp; + int nvclks, mclks, pclks, vpagemiss, crtpagemiss; + int nvclk_fill; int found, mclk_extra, mclk_loop, cbs, m1; int mclk_freq, pclk_freq, nvclk_freq, mp_enable; - int us_m, us_m_min, us_n, us_p, video_drain_rate, crtc_drain_rate; + int us_m, us_m_min, us_n, us_p, crtc_drain_rate; int vus_m, vus_n, vus_p; - int vpm_us, us_video, vlwm, cpm_us, us_crt,clwm; + int vpm_us, us_video, cpm_us, us_crt,clwm; int clwm_rnd_down; - int craw, m2us, us_pipe, us_pipe_min, vus_pipe, p1clk, p2; - int pclks_2_top_fifo, min_mclk_extra; + int m2us, us_pipe_min, p1clk, p2; + int min_mclk_extra; int us_min_mclk_extra; fifo->valid = 1; @@ -854,16 +854,13 @@ static void nv10CalcArbitration mclk_freq = arb->mclk_khz; nvclk_freq = arb->nvclk_khz; pagemiss = arb->mem_page_miss; - cas = arb->mem_latency; width = arb->memory_width/64; video_enable = arb->enable_video; bpp = arb->pix_bpp; mp_enable = arb->enable_mp; clwm = 0; - vlwm = 1024; cbs = 512; - vbs = 512; pclks = 4; /* lwm detect. */ @@ -924,17 +921,13 @@ static void nv10CalcArbitration us_min_mclk_extra = min_mclk_extra *1000*1000 / mclk_freq; us_n = nvclks*1000*1000 / nvclk_freq;/* nvclk latency in us */ us_p = pclks*1000*1000 / pclk_freq;/* nvclk latency in us */ - us_pipe = us_m + us_n + us_p; us_pipe_min = us_m_min + us_n + us_p; - us_extra = 0; vus_m = mclk_loop *1000*1000 / mclk_freq; /* Mclk latency in us */ vus_n = (4)*1000*1000 / nvclk_freq;/* nvclk latency in us */ vus_p = 0*1000*1000 / pclk_freq;/* pclk latency in us */ - vus_pipe = vus_m + vus_n + vus_p; if(video_enable) { - video_drain_rate = pclk_freq * 4; /* MB/s */ crtc_drain_rate = pclk_freq * bpp/8; /* MB/s */ vpagemiss = 1; /* self generating page miss */ @@ -993,7 +986,6 @@ static void nv10CalcArbitration else if(crtc_drain_rate * 100 >= nvclk_fill * 98) { clwm = 1024; cbs = 512; - us_extra = (cbs * 1000 * 1000)/ (8*width)/mclk_freq ; } } } @@ -1010,7 +1002,6 @@ static void nv10CalcArbitration m1 = clwm + cbs - 1024; /* Amount of overfill */ m2us = us_pipe_min + us_min_mclk_extra; - pclks_2_top_fifo = (1024-clwm)/(8*width); /* pclk cycles to drain */ p1clk = m2us * pclk_freq/(1000*1000); @@ -1038,14 +1029,13 @@ static void nv10CalcArbitration min_mclk_extra--; } } - craw = clwm; if(clwm < (1024-cbs+8)) clwm = 1024-cbs+8; data = (int)(clwm); /* printf("CRT LWM: %f bytes, prog: 0x%x, bs: 256\n", clwm, data ); */ fifo->graphics_lwm = data; fifo->graphics_burst_size = cbs; - /* printf("VID LWM: %f bytes, prog: 0x%x, bs: %d\n, ", vlwm, data, vbs ); */ + /* printf("VID LWM: 1024 bytes, prog: 0x%x, bs: 512\n, ", data); */ fifo->video_lwm = 1024; fifo->video_burst_size = 512; } }