Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp20889581ybl; Sun, 5 Jan 2020 14:09:26 -0800 (PST) X-Google-Smtp-Source: APXvYqymnGzInJTtm+3v2ufr1yuf84lZteOXezS6fhsXGNKlzzoAYLomyMFYPuQ1KaeLwGQezqii X-Received: by 2002:a9d:7410:: with SMTP id n16mr100383227otk.23.1578262166450; Sun, 05 Jan 2020 14:09:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578262166; cv=none; d=google.com; s=arc-20160816; b=EpbBy2m8UYAaf/nYNaRVy4x70tKaiG3BZ7FEFcDFSGMenziMhDNv7Q0++lTDBlPT5C /6GnA8A4qkAauHHVBmPwq86UzePDubgQlnPdH/Gf4p2wrUHvkluH2IHJunl2ONZONSjX 6KPOoiiO448YmgdcKotW1/xAIPd1Nntuskap2LDWeX4ENyvprQidGqFRH+sx4bYKW3VW kXSRFumRwtYEdqZEQspoO2Pu+iWQmRmJ1fzxZdxvNeacgOiRriYMX+F+E2e84t8GCgVL w4kwGMTIQc7aHgx6RVhbpJ6vAoPoPP/BCUwGvDr8JzNwKHx5TA09Hsd+LJlPHz5sY5q9 kZGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Uw6b7W2hJ0QLRZ1xDtPnAWhipPvQAM3seWtHwc/JeWI=; b=Kyhsr3Lb46S9KTJ7JsytsFcBzR7JNx6/WzdHgjE73w8oi0QA5SEw1EEisbmrcVxhR0 j9Xj2h7KRrEhcL+5bcT+hIc8aAMFdP/5DuIKEEfPngRaA9fjN7lSISw6n+puNpE/EaAK W9VK63JJ9D2/PApPHQUjLGclNE7zaTGMrIBuQirEzZiFAdi212qzoCdDCCS/m0BzZbUk N3sm1mHBmQI2XtroPm/gL4Wx3vQvaS4aEeHArGViFlW7usjDyUitc4RVUbbCm6p2lNSn Dvttx3P7k1PO8e/kqjBYkvQYtF57vgHpHKA/G0gyPXhPQBCPdzEcoT/mzgCHNC/wsuDr Gccg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n4jadz24; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f60si32649094otf.119.2020.01.05.14.09.03; Sun, 05 Jan 2020 14:09:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n4jadz24; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727036AbgAEWG5 (ORCPT + 99 others); Sun, 5 Jan 2020 17:06:57 -0500 Received: from mail-vs1-f65.google.com ([209.85.217.65]:44067 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726851AbgAEWG5 (ORCPT ); Sun, 5 Jan 2020 17:06:57 -0500 Received: by mail-vs1-f65.google.com with SMTP id p6so30539820vsj.11 for ; Sun, 05 Jan 2020 14:06:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Uw6b7W2hJ0QLRZ1xDtPnAWhipPvQAM3seWtHwc/JeWI=; b=n4jadz24z7JBewNrViqatR++YynQbD5azEZKxjZxFfvD368syVdZM1Ub7qpNXso0kX rhnOVjJ964h2axKqSfgW9ZGznWx5H37Wta9Zic+/tf5qtQ3Kw2Jls8ePPuwAIH1LEu9n /ITeQn9WUJVapcMrLG2KqGvJlEZkHWC6J9Chv4sGuO13joIoxXIoAoYk7zPjHfgnkxyG pC+oU2JPFCZTH5XDn5WF5GCI5f14EuYDHEsIWPn7tdx59Ebsi9LeB6pvCQsmpJ98ToEc geFFpUkywXbDL6iGW5LiilUZSb4WgxoECXQMA9oHdFfJkBZb1wyCeHD/MqBNwxnnlp+k 9zzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Uw6b7W2hJ0QLRZ1xDtPnAWhipPvQAM3seWtHwc/JeWI=; b=JzQIFYp2//EEM2fqcdz8szORkwcJ5+zix93FoXJGIz8sltMyaImKjBSNSrbLCdxtOg t9PkrEi99c6eiUhZ3twkmRTPrRndChxL+ESd/XLbmsmydkdlaOC1XMbjeYcQC/6ivx1x xVe8ppBpbgMMXfE/otMj2uN4FQ/lLkvIwV58Nnl/pI99UeCponbR40VtShePxaiehNr9 567e5vq9Us6FFjHC56RbB0W7/E0K/bAO7dle0jEaAx54uFe+6PnJ320ww/FFPPHd+WJU HKdCqDCpHcUtL364VY4puH1r02lVh8mYl1U7TLiEbkev53+rpjGgoJGezkLRRIHtRTHA nxhA== X-Gm-Message-State: APjAAAUSp9NedlmUHh3QtVyVlrf5j33GnuL2R1tqvorgwnoPzwKUGNFS +4O12/cIgwtzWpNr67x60gC1UenugVsQAOMKo2g= X-Received: by 2002:a67:1447:: with SMTP id 68mr34488742vsu.76.1578262016414; Sun, 05 Jan 2020 14:06:56 -0800 (PST) MIME-Version: 1.0 References: <20191231205607.1005-1-wambui.karugax@gmail.com> <20200101184843.GA3856@dvetter-linux.ger.corp.intel.com> In-Reply-To: <20200101184843.GA3856@dvetter-linux.ger.corp.intel.com> From: Ben Skeggs Date: Mon, 6 Jan 2020 08:06:45 +1000 Message-ID: Subject: Re: [Nouveau] [PATCH] drm/nouveau: remove set but unused variable. To: Wambui Karuga , Ben Skeggs , Dave Airlie , ML dri-devel , ML nouveau , LKML Cc: Daniel Vetter Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Jan 2020 at 04:48, Daniel Vetter wrote: > > On Tue, Dec 31, 2019 at 11:56:07PM +0300, Wambui Karuga wrote: > > The local variable `pclks` is defined and set but not used and can > > therefore be removed. > > Issue found by coccinelle. > > > > Signed-off-by: Wambui Karuga > > --- > > drivers/gpu/drm/nouveau/dispnv04/arb.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/nouveau/dispnv04/arb.c b/drivers/gpu/drm/nouveau/dispnv04/arb.c > > index 362495535e69..f607a04d262d 100644 > > --- a/drivers/gpu/drm/nouveau/dispnv04/arb.c > > +++ b/drivers/gpu/drm/nouveau/dispnv04/arb.c > > @@ -54,7 +54,7 @@ static void > > nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) > > { > > int pagemiss, cas, width, bpp; > > - int nvclks, mclks, pclks, crtpagemiss; > > + int nvclks, mclks, crtpagemiss; > > Hm, reading the code (just from how stuff is named) I wonder whether the > original idea was that the calculation for us_p should us pclks, not > nvclks, but given that this code is as old as the initial nouveau merge > probably not a good idea to touch it. Plus I guess not many with a vintage > nv04 in working condition around to even test stuff ... > > Ben, what should we do here? I looked at the original code from xf86-video-nv, and pclks is similarly unused there also, so, I'd vote for just picking up this patch. I don't believe anyone has the knowledge+hw anymore to mess with it in any other way. Ben. > -Daniel > > > int found, mclk_extra, mclk_loop, cbs, m1, p1; > > int mclk_freq, pclk_freq, nvclk_freq; > > int us_m, us_n, us_p, crtc_drain_rate; > > @@ -69,7 +69,6 @@ nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) > > bpp = arb->bpp; > > cbs = 128; > > > > - pclks = 2; > > nvclks = 10; > > mclks = 13 + cas; > > mclk_extra = 3; > > -- > > 2.17.1 > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch > _______________________________________________ > Nouveau mailing list > Nouveau@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau