From patchwork Wed Feb 2 13:48:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 12732891 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 1783AC433F5 for ; Wed, 2 Feb 2022 13:53:22 +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:References:In-Reply-To: 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: List-Owner; bh=Fh5HVfWC4fU0vRblNsUmcDWSAsAjpD2/qDRN8cl9dGU=; b=u/zCDk/z4ZUlcH LjRtctp3KOlFF6UBhfRvyyHI2OUQEtid2tKLo51Jj8GPE1hJmInofXGSctHQ6HLDmLcQaH9bBZ4Cs qFbkCnLsuIhFzN6aizl3K+7nc1sRaLOlhKq5dsFdvn2ghfTIQhAJzlIaim5O6vUiTjmg9WmZTeYVj p32IhphiwBLBGTjlrSXeh3rs5EZPdG2NTfZJk2ZPg992evdrE8lGTQUYXhbT4YrNWS+Xb6QABQTDd w86QVp0sp5qpCv7y3tY7HzkNKBfD22WqJ44HEhU8ypbjwl0VJijSU7xYxkQwdStJE3l/j+3ffR4wS S0dw9VepvvE/Gfq6OiVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFG2o-00FQ7m-VP; Wed, 02 Feb 2022 13:51:35 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFG17-00FOwa-8K for linux-arm-kernel@lists.infradead.org; Wed, 02 Feb 2022 13:49:50 +0000 Received: by mail-pg1-x52c.google.com with SMTP id g20so18312319pgn.10 for ; Wed, 02 Feb 2022 05:49:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MnC5wd+W1Uub0jyBTii0bw1jKUM0SD+MmltxaETPxmI=; b=ifkWBdljLlCdQrsnHb2AaA0xiVXH5i/9qcSv1GL6LW/PoUV26HY1RZyR5xcnjsOr+z uhIw6zBd7oLaRiZv9+E5Nf7YQ9SgfnPGAFRR4NBLw3veNFLU0UCkMO55TcQkWkEoldYV 0nhn7rMWunukBQmGpuPAbvZXiLDhoeuy/Ko8Y= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=MnC5wd+W1Uub0jyBTii0bw1jKUM0SD+MmltxaETPxmI=; b=nHcHnw/WpfBzjKO9Y5uKCPoA1ZRzakr7OM2UO22BzarXXUL4B5EzGXkS/ubJmH7T7Z oIybhVpxfvIcx0Ga/PS8y/39BrPMmYaiQUDEI7Um7NXgC+kyHuZ/DAVLbRmg89eCzEJe Bw2PzEPAH9HZDxsSUOz/CcrXosv+gbcwBgDXu92RzzRvb1puhW4pfL/Kbt9fU+7T2eQn PZd8mcT1L9ZrsTPmsKa7hpZCk5jk6vV1DrMJMSIJCDz3ailKIuLKL7DRTRV8nPJkV0Lu OjL9714zmVZUeeeijxj74UQbcmVCbXRnE9Z6BHMAj2tr+AzPiyEcbD5FrjIjTis27bb3 b7cQ== X-Gm-Message-State: AOAM531fo51Vw118RyP8iUBPrMrjAzbbjf7dFTxmNPV7ey12u8zMbudK COcZzNqZMlK0BggCfDfLkwdJPA== X-Google-Smtp-Source: ABdhPJyE1fU1DE0Y18OMUQ3BYgMoazVLDzDLvc5zUeGVpD74dfmN2S3rdVUMXCpYNy7oMRTOlZT5Ow== X-Received: by 2002:a65:400a:: with SMTP id f10mr24302297pgp.161.1643809788467; Wed, 02 Feb 2022 05:49:48 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:78b5:214c:c81:b9aa]) by smtp.gmail.com with ESMTPSA id w19sm27335684pfu.47.2022.02.02.05.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 05:49:48 -0800 (PST) From: Chen-Yu Tsai To: Stephen Boyd , Michael Turquette , Matthias Brugger Cc: Chen-Yu Tsai , Chun-Jie Chen , Miles Chen , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 05/31] clk: mediatek: gate: Clean up included headers Date: Wed, 2 Feb 2022 21:48:08 +0800 Message-Id: <20220202134834.690675-6-wenst@chromium.org> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog In-Reply-To: <20220202134834.690675-1-wenst@chromium.org> References: <20220202134834.690675-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220202_054949_305960_6B1C4976 X-CRM114-Status: GOOD ( 12.20 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some included headers aren't actually used anywhere, while other headers with the declaration of functions and structures aren't directly included. Get rid of the unused ones, and add the ones that should be included directly. On the header side, replace headers that are included purely for data structure definitions with forward declarations. This decreases the amount of preprocessing and compilation effort required for each inclusion. Signed-off-by: Chen-Yu Tsai Reviewed-by: Miles Chen Reviewed-by: AngeloGioacchino Del Regno --- drivers/clk/mediatek/clk-gate.c | 11 +++-------- drivers/clk/mediatek/clk-gate.h | 10 +++++++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/clk/mediatek/clk-gate.c b/drivers/clk/mediatek/clk-gate.c index ed1ad5535d41..e8881ae1489a 100644 --- a/drivers/clk/mediatek/clk-gate.c +++ b/drivers/clk/mediatek/clk-gate.c @@ -4,18 +4,13 @@ * Author: James Liao */ -#include -#include - -#include -#include -#include -#include #include -#include #include #include +#include #include +#include +#include #include "clk-gate.h" diff --git a/drivers/clk/mediatek/clk-gate.h b/drivers/clk/mediatek/clk-gate.h index 344adffb6578..6b5738826a22 100644 --- a/drivers/clk/mediatek/clk-gate.h +++ b/drivers/clk/mediatek/clk-gate.h @@ -7,9 +7,13 @@ #ifndef __DRV_CLK_GATE_H #define __DRV_CLK_GATE_H -#include -#include -#include +#include + +struct clk; +struct clk_onecell_data; +struct clk_ops; +struct device; +struct device_node; extern const struct clk_ops mtk_clk_gate_ops_setclr; extern const struct clk_ops mtk_clk_gate_ops_setclr_inv;