From patchwork Sat Jan 22 09:17:11 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: 12720650 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 9FFE0C433EF for ; Sat, 22 Jan 2022 09:24:56 +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=WfbolzoLs3ta0uwPJfYyrsDNt1s99kJib6D4OASz24o=; b=F7T6NI/Ap+yTwx DpRQ+3mbdKrfuVrI6GxCBbjF9NKx8JbxqBesK9gWwZI/FFueXeUWJAqFVFHRyy6B5zXeuR1WILBon 41EDhGgAaFe/4SOONg/T0yk3tfDxSv+RXC9JGLNW3bO78dX9RMS9MDWU/PeUCzA2P/SFhiWFZelp9 ITxPnwEl8irR+tVwRuWQEjUaFM2+59uWh4PU3fgmFZ+Jak3JCBWKLWW6L1b01dv5y0ePsJcu7/8cA bDmil+YXGNeRBN9kDrOlSIwkJ+yvGajKFjw1ChMtZxaGIhZKpH8yBoclxVP+NFdWRxFSVvwNXuU5/ oVfFWkg0q9bGCjHYvokg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBCcH-00GuAY-2A; Sat, 22 Jan 2022 09:23:25 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBCXB-00GrWl-TO for linux-arm-kernel@lists.infradead.org; Sat, 22 Jan 2022 09:18:13 +0000 Received: by mail-pj1-x1032.google.com with SMTP id nn16-20020a17090b38d000b001b56b2bce31so353368pjb.3 for ; Sat, 22 Jan 2022 01:18:09 -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=vNUxjw49tFByvcP8t/7//e7iEPYHFps9QVk8zZRKtaU=; b=FphTI/EUT+pYQ6+s8N+x8etvO1gp8ydoS32Ye8uTFtcA0dTunlpW4uIwQ8xsAMAxcJ 59qGp9DBrlbRSSwNDb82LSehk5xTkcD/mHbvAFeT676O/lkQPLP6mUPFmHnuvbvCzsH0 CmhrQYDiTI3PF6wwTPqVw2KJy6h1l7YA5ZCvs= 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=vNUxjw49tFByvcP8t/7//e7iEPYHFps9QVk8zZRKtaU=; b=TWXeoEAmNueVhbL/iReU9NZYnPQ0DQieJXxJWJovtziiepZRayJqeHNR3By2TE4cKB KRelcVWDxr40qnvzd9JKU4Z9ulczThBjiaSyioirqu0uFzzzulomtCuW+DPt8hvB2Q/B LQvNmjMk+BdjxwD9EMX15rNtJi+UACkymrkKaXMwx+ToXBYBtoCwbnSkx+Idm6EvivsI ajrQLKtjhwqyLi3pFVkmBn/cG+WmEqRWPo5bBJiTx2DwoCsTetNx/qNoxwDP45IgSCZ6 HH1nMEIkcXFYR3Qp6TuSbCrVK7+dda2BvIk/gyzSkQd/SSvKJ1ZEr51xiuffAdBj+hmd pGFw== X-Gm-Message-State: AOAM533FH6/wP/Ae3l1X7z8WXH1Iy8SSLLbvco78crFjCfCKQm5JF1eX /y62DaQRBovvxw+5TQmxDU26+g== X-Google-Smtp-Source: ABdhPJzt50XykWx+0tWjlGukGzZMOR/XsM+FWIFaNqeZRK3fs6wk/ktZqv15RMlzys50RaboRzuhyQ== X-Received: by 2002:a17:90a:5e05:: with SMTP id w5mr4443843pjf.57.1642843089091; Sat, 22 Jan 2022 01:18:09 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:349f:9373:45d9:eb26]) by smtp.gmail.com with ESMTPSA id s1sm1608100pjn.42.2022.01.22.01.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jan 2022 01:18:08 -0800 (PST) From: Chen-Yu Tsai To: Stephen Boyd , Michael Turquette , Matthias Brugger Cc: Chen-Yu Tsai , Chun-Jie Chen , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/31] clk: mediatek: mux: Clean up included headers Date: Sat, 22 Jan 2022 17:17:11 +0800 Message-Id: <20220122091731.283592-12-wenst@chromium.org> X-Mailer: git-send-email 2.35.0.rc0.227.g00780c9af4-goog In-Reply-To: <20220122091731.283592-1-wenst@chromium.org> References: <20220122091731.283592-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220122_011810_030196_32E6DD4F X-CRM114-Status: GOOD ( 11.45 ) 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 --- drivers/clk/mediatek/clk-mux.c | 11 +++++++---- drivers/clk/mediatek/clk-mux.h | 8 +++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/clk/mediatek/clk-mux.c b/drivers/clk/mediatek/clk-mux.c index 2d4d8dc0120a..01af6a52711a 100644 --- a/drivers/clk/mediatek/clk-mux.c +++ b/drivers/clk/mediatek/clk-mux.c @@ -4,13 +4,16 @@ * Author: Owen Chen */ -#include -#include -#include +#include +#include +#include +#include #include #include +#include +#include +#include -#include "clk-mtk.h" #include "clk-mux.h" struct mtk_clk_mux { diff --git a/drivers/clk/mediatek/clk-mux.h b/drivers/clk/mediatek/clk-mux.h index 38a2b6014b08..903a3c937959 100644 --- a/drivers/clk/mediatek/clk-mux.h +++ b/drivers/clk/mediatek/clk-mux.h @@ -7,7 +7,13 @@ #ifndef __DRV_CLK_MTK_MUX_H #define __DRV_CLK_MTK_MUX_H -#include +#include +#include + +struct clk; +struct clk_onecell_data; +struct clk_ops; +struct device_node; struct mtk_mux { int id;