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 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 A6F95C05027 for ; Mon, 20 Feb 2023 10:49:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5139B85843; Mon, 20 Feb 2023 11:49:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="GY1g5+DA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="8l6DRtH+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6EDB985805; Mon, 20 Feb 2023 11:49:53 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (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 22DF8857E9 for ; Mon, 20 Feb 2023 11:49:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=msuchanek@suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id D1DE71FFE3; Mon, 20 Feb 2023 10:49:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1676890189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m37pvKiUOL6vI54O4jJp0qV/Wsy2fPr+RVsap+Dp7S8=; b=GY1g5+DA53DMz8hpRUnAn0F7WMRdEho+b9tc0xESYw9gnj9KgTXdhFr0fAqPG/HDOn+QJA FIMLTXDm0ipNhyVbgf9pH8WJ//VxVlqBJoMJNVxchfSrjYg1DtEoECgOSbR6gXjQhOFFbo UphQyZNHfJpRjzElS6783jo+pMavf68= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1676890189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m37pvKiUOL6vI54O4jJp0qV/Wsy2fPr+RVsap+Dp7S8=; b=8l6DRtH+MRWUGLuV74lrnjejxBx/JcZYY72Xqk4slWg79oMv1zSi93bMSQNmBngCQ0doo7 MuSxKHR+y4vdivBA== Received: from kitsune.suse.cz (kitsune.suse.cz [10.100.12.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 68AFB2C141; Mon, 20 Feb 2023 10:49:49 +0000 (UTC) Date: Mon, 20 Feb 2023 11:49:48 +0100 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Samuel Holland Cc: Lukasz Majewski , Sean Anderson , Simon Glass , Dario Binacchi , Jean-Jacques Hiblot , Neil Armstrong , Peng Fan , u-boot@lists.denx.de Subject: Re: [PATCH 5/6] clk: Remove an unneeded check from clk_get_parent_rate() Message-ID: <20230220104948.GL19419@kitsune.suse.cz> References: <20230220055940.41890-1-samuel@sholland.org> <20230220055940.41890-6-samuel@sholland.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230220055940.41890-6-samuel@sholland.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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 On Sun, Feb 19, 2023 at 11:59:38PM -0600, Samuel Holland wrote: > 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) Reviewed-by: Michal Suchánek Thanks Michal