From mboxrd@z Thu Jan 1 00:00:00 1970 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 8CEFBC3F6B0 for ; Mon, 15 Aug 2022 15:44:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232347AbiHOPnl (ORCPT ); Mon, 15 Aug 2022 11:43:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbiHOPnW (ORCPT ); Mon, 15 Aug 2022 11:43:22 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A7856563 for ; Mon, 15 Aug 2022 08:43:22 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id BD13A3200977; Mon, 15 Aug 2022 11:43:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 15 Aug 2022 11:43:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1660578200; x=1660664600; bh=yh A8vGjZQoyrMGP1d9gV/7SGhFCQzVz0jDc+vLgB60c=; b=oeQm2JxmT5L2eWkWQO V0iC0kvC4mZ1WLPUPnij+zNv/gE89Gtt5EDRQ4GSQSkTjC5/NZsU98B/TV3fVhAg L3CMM+de9MWtxzhoc9olSErD+NaLwMzM3RNOzmvkPRtLqvhyr7vPQ8mQIAQ7+lRl z6wE3YDTF8Pam6DlSriS4ZuQizG5rpZCW1AX4HW+w/DVJ9sZjOUr3uUeI02sgXjT a+jPCdMkZ+0XX0cdCT44GmajzL7uWPuYT7FAv8b3PSNroZNQn2AjzmeA6x1+j6Ex DhYwf3PtE334JJuxwHiUtkmxCGwfws1bGnXTL+kIJhTuhKZHjrovf3x+zwADg7ZX xMDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1660578200; x=1660664600; bh=yhA8vGjZQoyrM GP1d9gV/7SGhFCQzVz0jDc+vLgB60c=; b=zcnTJF3/ewvpwjT903pWfhHwV7o8T /LspA++hIzSeSfbPZhgcMVQJOLbp5CT1tJNsBPFXNsQsmBreWegE/4ZYf1cNXMn4 bOhjwGMBpFdnYr6wwY7yqST7+3eHhZee7v4loWjtALXtrLS47cEwsUlhDxVbbgQa +sfMh1DU8x4IB5jcGx31unN1uWkGC0EKR0+wo+ThPV6IENTw4bT6xJ/tSoEKNRDx eZdmQGcNp+D+ZVwED5Mp9H6EvCt5iXm9F9Vju1CtiK6Eg+T8gAWsQQibe4YQoKEJ wijs8p1feLihTj9e6LftIPAoOPM5AZUygJ68MJ9r/C35ad6c8lIJfC3Tw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehvddgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeelkeefteduhfekjeeihfetudfguedvveekkeetteekhfekhfdtlefgfedu vdejhfenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 Aug 2022 11:43:19 -0400 (EDT) From: Maxime Ripard To: linux-clk@vger.kernel.org, Mike Turquette , Stephen Boyd Cc: Tony Lindgren , Jerome Brunet , Neil Armstrong , Yassine Oudjana , Dmitry Baryshkov , Marek Szyprowski , Naresh Kamboju , Alexander Stein , Maxime Ripard Subject: [PATCH v8 20/25] clk: Constify clk_has_parent() Date: Mon, 15 Aug 2022 17:41:42 +0200 Message-Id: <20220815154147.1631441-21-maxime@cerno.tech> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220815154147.1631441-1-maxime@cerno.tech> References: <20220815154147.1631441-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org clk_has_parent() doesn't modify the clocks being passed, so let's make it const. Suggested-by: Stephen Boyd Signed-off-by: Maxime Ripard --- drivers/clk/clk.c | 2 +- include/linux/clk.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 7fc6347e66c6..6c0fdf04a229 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2588,7 +2588,7 @@ void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent) * * Returns true if @parent is a possible parent for @clk, false otherwise. */ -bool clk_has_parent(struct clk *clk, struct clk *parent) +bool clk_has_parent(const struct clk *clk, const struct clk *parent) { /* NULL clocks should be nops, so return success if either is NULL. */ if (!clk || !parent) diff --git a/include/linux/clk.h b/include/linux/clk.h index c13061cabdfc..1ef013324237 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -799,7 +799,7 @@ int clk_set_rate_exclusive(struct clk *clk, unsigned long rate); * * Returns true if @parent is a possible parent for @clk, false otherwise. */ -bool clk_has_parent(struct clk *clk, struct clk *parent); +bool clk_has_parent(const struct clk *clk, const struct clk *parent); /** * clk_set_rate_range - set a rate range for a clock source -- 2.37.1