From patchwork Thu Feb 17 22:05:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12750690 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE80FC433F5 for ; Thu, 17 Feb 2022 22:05:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343770AbiBQWGL (ORCPT ); Thu, 17 Feb 2022 17:06:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233769AbiBQWGL (ORCPT ); Thu, 17 Feb 2022 17:06:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F96341FAF; Thu, 17 Feb 2022 14:05:56 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 37F39616CD; Thu, 17 Feb 2022 22:05:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 772E7C340EC; Thu, 17 Feb 2022 22:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645135555; bh=xGGr8nolCA3MC3UDtSnlfXLw6r3mD7Bx3LfbJtOR3Xg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P1ytIcrwYt9p9kb2zidKPPnISP+rFHH7gJejQT2xvLRObgv6ejtM6XGaR8FEynZyN tkiNXFjTBbHfySKeTzcA8+9v+Pb8QamZs/IB3okFLpvO3Hso3Z+A4TPIXQ+kGpj0U6 pdyL9i9Eipy1yrvSwNRIXLYUD3uKWwhqzpDwb9CqH5A1/2GYEYjWLxdATQ5G/vGPeW +Y3eRj5cSAuCuYbwtCD4n68Qh6FC+/QL8e4FNYngVGEX4NFyTLmOrvvsxkowyOkwiG jflT76vHISlo4uEJ2iBL0d6ysTbHVWw3redLrfGZx/H4UG63vR5SPeifCVhZbhCMk5 Wt9hdDZ3J55QA== From: Stephen Boyd To: Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 1/2] clk: Mark 'all_lists' as const Date: Thu, 17 Feb 2022 14:05:53 -0800 Message-Id: <20220217220554.2711696-2-sboyd@kernel.org> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog In-Reply-To: <20220217220554.2711696-1-sboyd@kernel.org> References: <20220217220554.2711696-1-sboyd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org This list array doesn't change at runtime. Mark it const to move to RO memory. Signed-off-by: Stephen Boyd --- drivers/clk/clk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 8de6a22498e7..16384e9437f5 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -37,7 +37,7 @@ static HLIST_HEAD(clk_root_list); static HLIST_HEAD(clk_orphan_list); static LIST_HEAD(clk_notifier_list); -static struct hlist_head *all_lists[] = { +static const struct hlist_head *all_lists[] = { &clk_root_list, &clk_orphan_list, NULL, @@ -4095,7 +4095,7 @@ static void clk_core_evict_parent_cache_subtree(struct clk_core *root, /* Remove this clk from all parent caches */ static void clk_core_evict_parent_cache(struct clk_core *core) { - struct hlist_head **lists; + const struct hlist_head **lists; struct clk_core *root; lockdep_assert_held(&prepare_lock);