Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2599590ybd; Thu, 27 Jun 2019 15:34:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjp0BjB3VhRYJOaWEve54TTcJc4/hhZS8tXQ7SIn/jrmTIzIvPAuOUgWaRpMPfFfT21c82 X-Received: by 2002:a63:fc52:: with SMTP id r18mr6012792pgk.378.1561674870692; Thu, 27 Jun 2019 15:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561674870; cv=none; d=google.com; s=arc-20160816; b=UECtfw7Krcwyf3dYoIG9aqI5sjObT8xIUZpuT6iVlNQeWsSAhlCh/a1xixBbKvJmx4 La+SGI7xE9F9qyn8G77dU4A4JCDEtl9qNIoI3EwRXgQ5ZnkGWxNqsrj7PKcTEpWtDjLq rpszeUqfoV5sSKvWTPRwaZH3KaNpGdJGRlKv/h4WfzS9OmhlX+eLfALkKL3vtAeQZ2dG JjFbIpnnORu6YRCOATPeRYmkAoDd8+sxFaUVSfTvlC9mVOPZAAP3WvLmj58QHig3Op32 Az72Bjnd27x0q6yKDexfNYUnhjmE+cV8JarxLtm4FoV0o/123WDwyflTcYxCQd1mlgwJ jFHA== 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=IhP7OCM25XXvVoqn42DaxOsI4TszTgSwcMwliaWKfKU=; b=UtWuKnNW1tiKE9ku+VpFSA6bu/At0oO1btCsnOD1kUVz28l+VO/2rjsMkf54xZwzLh KOPlddcClBkpG84CbE8+HKRJFSxSwONH9U1Wc/qCbYxZyUmyD5tgIkSuYePKedPr9gIv VuQ9smMEHcscXoOv9NgSZj4geS9q6W3hKjlRaa3OiT73/MX4c9/QR7VxHW2kqfH0XOi5 BLvfgZv+zcDtsC/3OJiaiODQ011Q+oO5QVws4bBm6ynGC7R6kt4OENdlWIs/qwrNVqRF 0eCe9goRd147lnKmPX3E6CcJqAO70tY9qHcTAAAg3SyFrFkzxsuV4Fwu2eMKVnJW5oU+ OEEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=APnj14df; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si275809pfp.288.2019.06.27.15.34.14; Thu, 27 Jun 2019 15:34:30 -0700 (PDT) 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=@google.com header.s=20161025 header.b=APnj14df; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726697AbfF0Wcu (ORCPT + 99 others); Thu, 27 Jun 2019 18:32:50 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:42884 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726653AbfF0Wcu (ORCPT ); Thu, 27 Jun 2019 18:32:50 -0400 Received: by mail-pl1-f195.google.com with SMTP id ay6so2031025plb.9 for ; Thu, 27 Jun 2019 15:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IhP7OCM25XXvVoqn42DaxOsI4TszTgSwcMwliaWKfKU=; b=APnj14df+CUg5mOEsoFJjH7YBNebYWhtkQjolLJgYPARmsWJQImqMpyxDo8U2saVad Ot+T60wL7vukQ2mTuVDLfeK+PAtXkQ5z70JhplcMeNdhqbHS7MzK9GbLPf8uZIN+s+iU Mw5Vi5zl9rWOLviihNFfDmQervkxHqbOtE6F/jEFk3QrR7nEJQgti7gB+2egkK5Lg2bP yfvTEhzhGPHsb+HO9RZ0gudIUHJL5R5z5b4qCIc1dJ0SbbwKmw918vZsuQ0Jg9JCzTtc S1t/jcjDk/mJbKmEiJi5o0ZDhgx+zWgEpe+lpe4686gCe12wvwmY3j+kceVdjwkxr8f0 BvJw== 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=IhP7OCM25XXvVoqn42DaxOsI4TszTgSwcMwliaWKfKU=; b=X5oq40UCMy+4uGLaQLqUTWlquYOEMLaX3EJGnQf/cx/zoq5okf8wB3X3XSCRCvd1FE i7pcoHaRNcRuJnOWfIJe4wj0fvEoViC63ALToMGrcUeX5dYCmoMHdedEcuKbUfw4q/jd VSoOBMDUrKO2366UIxSvR5XfdY8IIO/kxOWeR+VGdZ14q4vWDYBHaiMTOiGjf02E6Mlr IRcPjKltedBZo65+ZcdCbHCKlhjPv8YwXyL4N9x/n4pQY+5u1z0JrBerZhT6qC8hOJ9v 8fE/wsKn5NZkGHn7ZsYeAxjooDgbQDrhBQB8Mu9GeXP8STT3zy+Ncvqw93WHnWruiDvw bPkw== X-Gm-Message-State: APjAAAVpefyTcRH/xZovuoK/OAdz2SKWUCPQ4cuBdacJ4wTO61n4SOH8 mhmXVlIdhjkMxFY1Risv2RYX2yKhyf701KbZMr0MIA== X-Received: by 2002:a17:902:9f93:: with SMTP id g19mr7307719plq.223.1561674769064; Thu, 27 Jun 2019 15:32:49 -0700 (PDT) MIME-Version: 1.0 References: <20190627222220.89175-1-nhuck@google.com> In-Reply-To: <20190627222220.89175-1-nhuck@google.com> From: Nick Desaulniers Date: Thu, 27 Jun 2019 15:32:38 -0700 Message-ID: Subject: Re: [PATCH] clk: rockchip: Fix -Wunused-const-variable To: Nathan Huckleberry Cc: mturquette@baylibre.com, sboyd@kernel.org, heiko@sntech.de, andy.yan@rock-chips.com, zhangqing@rock-chips.com, linux-clk@vger.kernel.org, Linux ARM , linux-rockchip@lists.infradead.org, LKML , clang-built-linux 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, Jun 27, 2019 at 3:22 PM 'Nathan Huckleberry' via Clang Built Linux wrote: > > Clang produces the following warning > > drivers/clk/rockchip/clk-rv1108.c:125:7: warning: unused variable > 'mux_pll_src_3plls_p' [-Wunused-const-variable] > PNAME(mux_pll_src_3plls_p) = { "apll", "gpll", "dpll" }; > > Looks like this variable was never used. Deleting it to remove the > warning. Indeed, looks like it was dead when introduced in: commit e44dde279492 ("clk: rockchip: add clock controller for rk1108") I don't see a pattern between when mux_pll_src_4plls_p vs mux_pll_src_2plls_p is used, so it's not clear where or even if mux_pll_src_3plls_p should be used. Given that there hasn't been a response to your original question (https://groups.google.com/forum/#!topic/clang-built-linux/NqJT9OPH5C8) and this patch is no functional change as the variable is already dead, I don't think it will hurt to remove it. It should also boost the signal to noise ratio of this warning. Thanks for looking into it, and the patch. Reviewed-by: Nick Desaulniers > diff --git a/drivers/clk/rockchip/clk-rv1108.c b/drivers/clk/rockchip/clk-rv1108.c > index 96cc6af5632c..5947d3192866 100644 > --- a/drivers/clk/rockchip/clk-rv1108.c > +++ b/drivers/clk/rockchip/clk-rv1108.c > @@ -122,7 +122,6 @@ PNAME(mux_usb480m_pre_p) = { "usbphy", "xin24m" }; > PNAME(mux_hdmiphy_phy_p) = { "hdmiphy", "xin24m" }; > PNAME(mux_dclk_hdmiphy_pre_p) = { "dclk_hdmiphy_src_gpll", "dclk_hdmiphy_src_dpll" }; > PNAME(mux_pll_src_4plls_p) = { "dpll", "gpll", "hdmiphy", "usb480m" }; > -PNAME(mux_pll_src_3plls_p) = { "apll", "gpll", "dpll" }; Thanks, ~Nick Desaulniers