From patchwork Mon Oct 2 20:12:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9981201 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 02C4B602A0 for ; Mon, 2 Oct 2017 20:14:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDDF4286F4 for ; Mon, 2 Oct 2017 20:14:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2AB02889C; Mon, 2 Oct 2017 20:14:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8014286F4 for ; Mon, 2 Oct 2017 20:14:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751250AbdJBUOS (ORCPT ); Mon, 2 Oct 2017 16:14:18 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35717 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751062AbdJBUOR (ORCPT ); Mon, 2 Oct 2017 16:14:17 -0400 Received: by mail-pf0-f195.google.com with SMTP id i23so6734571pfi.2; Mon, 02 Oct 2017 13:14:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=QxfPd/65KdNN5FUR4kQ8go1czqtSFVpZR7dNYlvZUX0=; b=ITfD6g1eXaCgcSX1wWYBMHD+e5XB5ogxoawkB/4VylZjfXQUqVeYpGHoT/loXKO+BQ f0HwyX2DUMnfwG8xRS+2CoeWfm8+LD6zgSpCtxeBCsXbNik4vVlHgFls0EmUkc9kV/hl O+mkGKDpJ13yEOmtTLPhqYhjTbXYNRIR8QQ8IGVubjL/X70y/WMAaqxByL8f0sv9dfuv kJpCwSsmyGBZ5JjyFhhu8u0w1kAWoq01UqZMau0j8halMgZubzzzPjXA0HsI1KF2T2dS Q5za95sqP5+ozzvDG4XemtQ6xPaUmHZ5Ul7cmXqnH2ApdN9UmS91gMYa4kfOn9KbzHFV kQ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QxfPd/65KdNN5FUR4kQ8go1czqtSFVpZR7dNYlvZUX0=; b=EYyXiitoxX6svp00FF7CmmWXrno0NN02nwCwSEd5PwvQe+O52m8RgaOtindEfT+i+5 aS9KR6PmqS3FIgF8hfR4Ebxj34TwxSNxXATn57w4U6+GQ9YTHFCnCwhTQiVbMRILKTGK dsQctjTo3a8upFWwKBzZ58lJRfxuLsSCQA3G/y1OmWOK4jllLLv4hmQKbH6WX79mUgmy CNL0CsVXvaFqZEkxrOy/cNvVlgslXK09gdiJo8CtATSXfVWruAYucreofek7MVnUes0r rdSFxzsLBxRqcy53qidpQAJGF04vXWEPiOmZSHXiMv8s9aDi8CkdPx20vNM5hKUlNmPT 5zTA== X-Gm-Message-State: AHPjjUirrwJrQ9N0Wq049Qozsm5uHYBI4E8Bf6xwLT2CdyMOYW0CqAG/ EQf8p1NJ3f5X238sxLa5cMs= X-Google-Smtp-Source: AOwi7QCrqBcevYmQ/Gc4Rh9EfnLO+QhOUZDt7cxpxlA1cAZ7+ErmVcnjBNc7vfbLbGhFka5MOM7WHA== X-Received: by 10.98.14.213 with SMTP id 82mr15608645pfo.320.1506975256590; Mon, 02 Oct 2017 13:14:16 -0700 (PDT) Received: from gmail.com ([117.196.110.146]) by smtp.gmail.com with ESMTPSA id w82sm18481003pfa.69.2017.10.02.13.14.09 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 02 Oct 2017 13:14:15 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Tue, 03 Oct 2017 01:44:06 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, pdeschrijver@nvidia.com, pgaikwad@nvidia.com, mturquette@baylibre.com, sboyd@codeaurora.org, thierry.reding@gmail.com, jonathanh@nvidia.com, linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: keescook@chromium.org, Bhumika Goyal Subject: [PATCH] clk: tegra30: make tegra_clk_pll_params __ro_after_init Date: Tue, 3 Oct 2017 01:42:08 +0530 Message-Id: <1506975128-16514-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These structures are only passed to the functions tegra_clk_register_pll, tegra_clk_register_pll{e/u} or tegra_periph_clk_init during the init phase. These functions modify the structures only during the init phase and after that the structures are never modified. Therefore, make them __ro_after_init. Signed-off-by: Bhumika Goyal Acked-By: Peter De Schrijver --- drivers/clk/tegra/clk-tegra30.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c index a2d163f..1ce7d76 100644 --- a/drivers/clk/tegra/clk-tegra30.c +++ b/drivers/clk/tegra/clk-tegra30.c @@ -359,7 +359,7 @@ }; /* PLL parameters */ -static struct tegra_clk_pll_params pll_c_params = { +static struct tegra_clk_pll_params pll_c_params __ro_after_init = { .input_min = 2000000, .input_max = 31000000, .cf_min = 1000000, @@ -388,7 +388,7 @@ .override_divp_shift = 15, }; -static struct tegra_clk_pll_params pll_m_params = { +static struct tegra_clk_pll_params pll_m_params __ro_after_init = { .input_min = 2000000, .input_max = 31000000, .cf_min = 1000000, @@ -409,7 +409,7 @@ TEGRA_PLL_HAS_LOCK_ENABLE | TEGRA_PLL_FIXED, }; -static struct tegra_clk_pll_params pll_p_params = { +static struct tegra_clk_pll_params pll_p_params __ro_after_init = { .input_min = 2000000, .input_max = 31000000, .cf_min = 1000000, @@ -444,7 +444,7 @@ TEGRA_PLL_HAS_LOCK_ENABLE, }; -static struct tegra_clk_pll_params pll_d_params = { +static struct tegra_clk_pll_params pll_d_params __ro_after_init = { .input_min = 2000000, .input_max = 40000000, .cf_min = 1000000, @@ -461,7 +461,7 @@ TEGRA_PLL_USE_LOCK | TEGRA_PLL_HAS_LOCK_ENABLE, }; -static struct tegra_clk_pll_params pll_d2_params = { +static struct tegra_clk_pll_params pll_d2_params __ro_after_init = { .input_min = 2000000, .input_max = 40000000, .cf_min = 1000000, @@ -478,7 +478,7 @@ TEGRA_PLL_USE_LOCK | TEGRA_PLL_HAS_LOCK_ENABLE, }; -static struct tegra_clk_pll_params pll_u_params = { +static struct tegra_clk_pll_params pll_u_params __ro_after_init = { .input_min = 2000000, .input_max = 40000000, .cf_min = 1000000, @@ -496,7 +496,7 @@ TEGRA_PLL_HAS_LOCK_ENABLE, }; -static struct tegra_clk_pll_params pll_x_params = { +static struct tegra_clk_pll_params pll_x_params __ro_after_init = { .input_min = 2000000, .input_max = 31000000, .cf_min = 1000000, @@ -513,7 +513,7 @@ TEGRA_PLL_USE_LOCK | TEGRA_PLL_HAS_LOCK_ENABLE, }; -static struct tegra_clk_pll_params pll_e_params = { +static struct tegra_clk_pll_params pll_e_params __ro_after_init = { .input_min = 12000000, .input_max = 216000000, .cf_min = 12000000,