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); From patchwork Thu Feb 17 22:05:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12750691 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 006D7C433EF for ; Thu, 17 Feb 2022 22:06:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343782AbiBQWGR (ORCPT ); Thu, 17 Feb 2022 17:06:17 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343778AbiBQWGN (ORCPT ); Thu, 17 Feb 2022 17:06:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F4B6403FC; Thu, 17 Feb 2022 14:05:58 -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 ams.source.kernel.org (Postfix) with ESMTPS id 473C8B82525; Thu, 17 Feb 2022 22:05:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE725C340ED; 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=xC3sMas1elxgw4kLQbsaL4sAm9oZF/1lhrWsO+BjMh4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dnuDsIo7jyXpfa2RxcQQJmHgLpP+VVvafAXhrBI6jqsLT7JcZc0FQOXhHUSH0IeY3 qLiSThNYW5Rt6TrAaTt5h0SwgHCdgBJZMNVu/1P0jfV7bFDizpqvLYrucxOV14X0mt hykTBw4AJ6ctVoZ4x195ufVj/hPoQ4SNoKWNYC0grWyjh73iZg3+2bmOZzCXVdx7wy jrdCi3kFgphSMKniH7PT/5eJj9J9E0dTVqLI+vn1LpIYyuSP67jlb+QGubGGcvMyND gIYIXggiZVmD+khZLPVchhAexej+BwRDDo/MIlgOjwXgrDL8LdnsQZA0iQwN4Pvn0R nEjkJWSy6fYEA== From: Stephen Boyd To: Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 2/2] clk: Mark clk_core_evict_parent_cache_subtree() 'target' const Date: Thu, 17 Feb 2022 14:05:54 -0800 Message-Id: <20220217220554.2711696-3-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 Clarify that the 'target' clk isn't being modified, instead it's being searched for. Mark it const so the function can't modify it. Signed-off-by: Stephen Boyd --- drivers/clk/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 16384e9437f5..d15997ea3930 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -4079,7 +4079,7 @@ static const struct clk_ops clk_nodrv_ops = { }; static void clk_core_evict_parent_cache_subtree(struct clk_core *root, - struct clk_core *target) + const struct clk_core *target) { int i; struct clk_core *child;