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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10CECC636D6 for ; Mon, 20 Feb 2023 06:01:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A12085902; Mon, 20 Feb 2023 07:01:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="mQ4Xc5fR"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="KixuLwGg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6BE158582B; Mon, 20 Feb 2023 07:00:00 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 681AC8582C for ; Mon, 20 Feb 2023 06:59:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 407BC3200C9D; Mon, 20 Feb 2023 00:59:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 20 Feb 2023 00:59:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; 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=fm2; t=1676872794; x=1676959194; bh=SH 8cU0q2W6t1NjaVa9uabcwvqp/hQ2VF2CdRM4g/PAM=; b=mQ4Xc5fRdB/vXUeVxo 38zUZHos7bCKXbJ0daOFa77NRP9tMzUTI0oQ4dwdCGGF4+bmxpmVgXoGGGZ1e2D9 bU3aTHqFPNMJ7HpfyXw+1h8hqVo6a7TRXcd1qX0blEXrAu5kz8kqEH8LK52/oiyF M1pvrUMyJQGGT1WYU6a48r3IAKYJ/el0sI24FckyEc/9tcIA2BQamSP534NnHB2J sCdtO7lPOT94fBAVEGfGqycOfNZgiQ+CFWpE+sSvkn7edu62a5qBQhefKlcd+KWp YWh9WP8oT0tWHWl1lnv5N0Jp04dU0S0pL4HJnf3FdhfqRdzGpCC92d94o6Z5JbzT xnHQ== 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=1676872794; x=1676959194; bh=SH8cU0q2W6t1N jaVa9uabcwvqp/hQ2VF2CdRM4g/PAM=; b=KixuLwGgvb7e/gU55yumPGAm/40zx LzsXlcg2/Cbx+88ceCL84mzJ9VPfGTU0eEBSMpesNOu5osU2b/cf2EcnaCM6L6qr 4MLVWRFLtrO/Gg7ryAgE+QtW+n/zxb0EQH1lPCIQgwtKi7zGIKgueQX7fP8rS8Jn sCVdY6oSF+snh4lULTIDGRzwpAclv5/BDKBLYmIymsTndID6JlKfdgQ5AUHKOc0t XZ7lsXMS7vSrQuCRwwTaH8ono8kQjKbo/Ea4JyFUTl3Q6BRYCJjGYO9suamGgNtP iV9JzTtgmbvDlFJAYT1bfNFDKUhp/oD86/+7kqXT3oEirKpqzRZhOzBuw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejgedgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Feb 2023 00:59:54 -0500 (EST) From: Samuel Holland To: Lukasz Majewski , Sean Anderson , Simon Glass Cc: Samuel Holland , Dario Binacchi , Jean-Jacques Hiblot , Michal Suchanek , Neil Armstrong , Peng Fan , u-boot@lists.denx.de Subject: [PATCH 5/6] clk: Remove an unneeded check from clk_get_parent_rate() Date: Sun, 19 Feb 2023 23:59:38 -0600 Message-Id: <20230220055940.41890-6-samuel@sholland.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230220055940.41890-1-samuel@sholland.org> References: <20230220055940.41890-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean There is no need to check the parent clock's ops. The following call to clk_get_rate() does that already. Signed-off-by: Samuel Holland --- drivers/clk/clk-uclass.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 9d052e5a814..53cfd819779 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -504,7 +504,6 @@ struct clk *clk_get_parent(struct clk *clk) ulong clk_get_parent_rate(struct clk *clk) { - const struct clk_ops *ops; struct clk *pclk; debug("%s(clk=%p)\n", __func__, clk); @@ -515,10 +514,6 @@ ulong clk_get_parent_rate(struct clk *clk) if (IS_ERR(pclk)) return -ENODEV; - ops = clk_dev_ops(pclk->dev); - if (!ops->get_rate) - return -ENOSYS; - /* Read the 'rate' if not already set or if proper flag set*/ if (!pclk->rate || IS_ERR_VALUE(pclk->rate) || pclk->flags & CLK_GET_RATE_NOCACHE) -- 2.39.2