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 CA71CC636CC for ; Mon, 20 Feb 2023 16:12:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 82A3485910; Mon, 20 Feb 2023 17:12:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LTWtpfZC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 594318591E; Mon, 20 Feb 2023 17:12:17 +0100 (CET) Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A5E13809A5 for ; Mon, 20 Feb 2023 17:12:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x82e.google.com with SMTP id g26so1081131qts.7 for ; Mon, 20 Feb 2023 08:12:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RQ7fQCyQJly1prL+FNL6PFv7VHez04Kp+16nNwbpkDQ=; b=LTWtpfZCbnZ6xl+JRREYkiRrYO7wOlhLHU7ygdHz/OmrwDx0eTgjt1C6+l3Spz6dZc K7EurG/6NEAKc4IkJclLjcshyGet3LxCi0P4gtSOqJPwBqwoJro+pJ76iIgpXv5VU0Iq ijAnkb1Woq2vgSaCxgpIBUPolZsDTMQ+1dUpWy6gdBqfCOTK2e85TTcceFOX62ughhdD u0jYYtzd8VM69b8JZco8W88g0hde/5C5nwMID1Z/8ZhvYtsAe/LZ5AG358LVUhsag3cN EQ58veMQQ2kyxn6XD4F34LhInmLZuq4MWxJGZV79311eo0Jv+mVHw2Ld4O2UyiSBkLuW eHDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RQ7fQCyQJly1prL+FNL6PFv7VHez04Kp+16nNwbpkDQ=; b=zSVsaB6jNqsgZiVAiArAY3o7wZvE6bUieICuHHr2xjzczbvkMS8ALd33VNtTS6Fw+d afzViQxC8R9sTSgQGBkfq1hFvotdv9oEmcToWZK+uiSevpqVU5420N7N42JbL3OL51Eg tr7OJpLtHFhSImRlfcHINC2dMlF9xcHota25zeyKb3bIbDjxEK+12R8xtISW5sz23tCj TTzFN3aZBkt3gCg8TeRBQkglgqvIbKzMG5Z/uPIHJmBQuLLCSw8YEwWfCmdE6QUW0DSf J61THa6b+su90ZtTRG8EIytX18besrI508mwU0YAj/pQ9LUFAOax1HQj6cn4WpT0yTOW 7vbQ== X-Gm-Message-State: AO0yUKU+Ck7s9MY2hceQKqhEPEcMgXqYA+gDYPGEscF0ri1UGS8ZqUiu oNdbpA8TSAsfjCpLbBduzrM= X-Google-Smtp-Source: AK7set/IwFlBQsyXYCwRedTo/QN8YJ9xSdRwvRv+nKtw0dZq2+5wi4bJcoK+JyJf3DpEiFRVndjfpg== X-Received: by 2002:ac8:5f84:0:b0:3bc:fa90:e8b9 with SMTP id j4-20020ac85f84000000b003bcfa90e8b9mr3241101qta.20.1676909533526; Mon, 20 Feb 2023 08:12:13 -0800 (PST) Received: from [192.168.1.201] (pool-173-73-95-180.washdc.fios.verizon.net. [173.73.95.180]) by smtp.gmail.com with ESMTPSA id fw13-20020a05622a4a8d00b003b86b962030sm6994872qtb.72.2023.02.20.08.12.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Feb 2023 08:12:13 -0800 (PST) Message-ID: <855bc6c9-98bd-a7d4-b96b-6faceee72f62@gmail.com> Date: Mon, 20 Feb 2023 11:12:12 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 5/6] clk: Remove an unneeded check from clk_get_parent_rate() Content-Language: en-US To: Samuel Holland , Lukasz Majewski , Simon Glass Cc: Dario Binacchi , Jean-Jacques Hiblot , Michal Suchanek , Neil Armstrong , Peng Fan , u-boot@lists.denx.de References: <20230220055940.41890-1-samuel@sholland.org> <20230220055940.41890-6-samuel@sholland.org> From: Sean Anderson In-Reply-To: <20230220055940.41890-6-samuel@sholland.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 2/20/23 00:59, 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: Sean Anderson