From patchwork Wed Dec 8 02:04:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zong Li X-Patchwork-Id: 12663259 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55E27C433F5 for ; Wed, 8 Dec 2021 02:04:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XVX2d5zvaCNo6qXHweVsVVGSUbCdS7fseiDIopLmkHM=; b=oKvLqI9XtfW7Ms KeJKWyNC0mJhZRv6+CP5mP9zauHBh5OP7JYq2fecW8N9juM5d021A/ag044HcI7DQIJLwoxZO/X/E /+HiijUq2tNl+tL1lv/Y3MOKOqrmpCTJrU5KPzs5/FSWpqz9QFnlHPE4fPhs9rMNvs1coHDeALZOX RapXjZm0q4aew1IZ3CkEYkP4MktR1dFNE9bTp36Qlmo89AJIQUPi8z71wdxbBM7c/ZygCo2KKvS9D h7R048AzUokuqpbPU5gPGQTNwWWYYe/7ZWxnRaiu3j3r4Bg9cM+4YtF5rUE3Rpa/14ARjcGoF3Apt Axz0RVENzwKfCax7l5eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mumJt-00Afb4-45; Wed, 08 Dec 2021 02:04:33 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mumJq-00Afaj-4I for linux-riscv@lists.infradead.org; Wed, 08 Dec 2021 02:04:31 +0000 Received: by mail-pl1-x633.google.com with SMTP id p18so509326plf.13 for ; Tue, 07 Dec 2021 18:04:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QGhWCkmSzao6PeC0Ex225wGHRUhhH5KgwhKdqzOJZvA=; b=YZ27ixf9+XfQMtQ3uXE/cQP2Ma/8qg0/QKNM7Pw1EEZ4KgvbcWAob75HGFNVic8Se+ zNrzhRkgISSv/Gegh3+EmZ9gKCXC6G+wVDeJ6vOaeM4Vf/zcuSUhGZpqLy0swwJQzayE 3uR6ZR0LLj72hednCXZyC/kXJ8BF8lud+pRbmyCJdcQ4PiPS1Ktxh/t20hvo4lMu1czi jeWj6XUtAFlthjBXPQtQ1wSm6OUDddAIV7arUAYx3PeyA0FK/n9WcWZCl3dpfa/pRVfu pVNjIXul/QWGJT8VHPLJ6YAeLLD5+BVlu3zy87t4lmMj/h4jwzDC8IKw2fRwaCPzyqJr Zo7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QGhWCkmSzao6PeC0Ex225wGHRUhhH5KgwhKdqzOJZvA=; b=rixB+u7qRu5wADFhx/ZthODHQMAiOG12uQGIu2JaI2C7JHuC4M+WlUSJcWq7n2hLEb F3tRYSX3hmNqLndh3EC2FDRp5hYw0ZCdu8fOXjvUvG4KYkdaWQawHdaPpW1CnYaGke+n nKQMedPrNkuJlfcXgykibcKsFbFOrlttlPKTdTYUcbnV38ff5ZI3Nqj1p02gvUCy10KI SpL7wxF6VCfh/dGDf8v/2/gr3apQqAMI/WJy9YuIEbATjycY/ddxNooVc4jNLIR8rV8G Y54hISZkLf63u491LXIAuDYEe2WpjYU4uPSvCCaNSmEARawmuDjQkdkPq+A7+y8lUGA0 UGTA== X-Gm-Message-State: AOAM533Zr7XSN0hpqm8ZYNiCi1WJglZtSPUequvd5cNUq+LIRGXn5ibG AikWqUq5KQAVgl0uc8aUvh+ATQ== X-Google-Smtp-Source: ABdhPJyGdggtAdCqWtci3i/oqvpmYcZUjWvaBoYPUoaEGyTuTbkrXuissLCUqR4a4hphrmR7mezhLQ== X-Received: by 2002:a17:902:c204:b0:142:2441:aa26 with SMTP id 4-20020a170902c20400b001422441aa26mr56090043pll.84.1638929068018; Tue, 07 Dec 2021 18:04:28 -0800 (PST) Received: from hsinchu16.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id b19sm1167929pfv.63.2021.12.07.18.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 18:04:27 -0800 (PST) From: Zong Li To: mturquette@baylibre.com, sboyd@kernel.org, palmer@dabbelt.com, paul.walmsley@sifive.com, lee.jones@linaro.org, linux-clk@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Zong Li Subject: [PATCH 1/1] clk: sifive: Fix W=1 kernel build warning Date: Wed, 8 Dec 2021 10:04:22 +0800 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_180430_224920_2124E292 X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org This commit reverts commit 487dc7bb6a0c ("clk: sifive: fu540-prci: Declare static const variable 'prci_clk_fu540' where it's used"). For fixing W=1 kernel build warning(s) about ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=], we should just remove the header including in fu540 and fu740 implementation respectively, because they don't actually use these static variables. After that, we could still separate SoCs-dependent data in their own defination, rather than put it in the common core code. Signed-off-by: Zong Li --- drivers/clk/sifive/fu540-prci.c | 1 - drivers/clk/sifive/fu540-prci.h | 5 +++++ drivers/clk/sifive/fu740-prci.c | 1 - drivers/clk/sifive/sifive-prci.c | 5 ----- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c index 29bab915003c..40ee5ab1748d 100644 --- a/drivers/clk/sifive/fu540-prci.c +++ b/drivers/clk/sifive/fu540-prci.c @@ -20,7 +20,6 @@ #include -#include "fu540-prci.h" #include "sifive-prci.h" /* PRCI integration data for each WRPLL instance */ diff --git a/drivers/clk/sifive/fu540-prci.h b/drivers/clk/sifive/fu540-prci.h index c220677dc010..c8271efa7bdc 100644 --- a/drivers/clk/sifive/fu540-prci.h +++ b/drivers/clk/sifive/fu540-prci.h @@ -13,4 +13,9 @@ extern struct __prci_clock __prci_init_clocks_fu540[NUM_CLOCK_FU540]; +static const struct prci_clk_desc prci_clk_fu540 = { + .clks = __prci_init_clocks_fu540, + .num_clks = ARRAY_SIZE(__prci_init_clocks_fu540), +}; + #endif /* __SIFIVE_CLK_FU540_PRCI_H */ diff --git a/drivers/clk/sifive/fu740-prci.c b/drivers/clk/sifive/fu740-prci.c index 53f6e00a03b9..e1da4eec0786 100644 --- a/drivers/clk/sifive/fu740-prci.c +++ b/drivers/clk/sifive/fu740-prci.c @@ -8,7 +8,6 @@ #include -#include "fu540-prci.h" #include "sifive-prci.h" /* PRCI integration data for each WRPLL instance */ diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c index 80a288c59e56..916d2fc28b9c 100644 --- a/drivers/clk/sifive/sifive-prci.c +++ b/drivers/clk/sifive/sifive-prci.c @@ -12,11 +12,6 @@ #include "fu540-prci.h" #include "fu740-prci.h" -static const struct prci_clk_desc prci_clk_fu540 = { - .clks = __prci_init_clocks_fu540, - .num_clks = ARRAY_SIZE(__prci_init_clocks_fu540), -}; - /* * Private functions */