Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1190160ioo; Sun, 22 May 2022 06:34:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3JHARzaN+7gR485dztEFGwwKSX93jPWXj/QHQ/pcj5Hu1hMCXUzMQYaVEcH6Vwz1+yYJs X-Received: by 2002:aa7:de8a:0:b0:42a:b51a:554c with SMTP id j10-20020aa7de8a000000b0042ab51a554cmr20119193edv.318.1653226441153; Sun, 22 May 2022 06:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653226441; cv=none; d=google.com; s=arc-20160816; b=XYVeTonaM6UpxAmEaAPXEuN9vSr4M9MFr5vD52vJvPy/Qm6o4CmEZK3S4/rqByeS6Z ZEXqy8J/rpBBX8z7fE4RFSAzHfM1TuqxxZeWgU/QdUbO8Ac8vsOtfMLoyGw3XEHRJ9vB omXDPteYPkkLoglsXYqcmPaTRiQNHOXFmgQ7A+znkz1tbWt7pBr050sBgRzeBmIRfmTD hsnPKv/h1JlrVCTrvLUIqDHT24rBuYbVJDoA34xmSAx1GWICHVHix6qxXTrvKO0A2NDM Qd7WVl231eJuE2NztTInwr2/dVgZV96/MWV+8ReadCpJcpHZemw8RbDpsVSi/7Sidd7W o6Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=xrVvgGpFwC0qfTU8CkXMR2gz4gvqWYcjZfKq5E02l7I=; b=CSaq91dGMcbD5JauTO7D4YwLpkuaGHOKxWkzYgfzns6bSuiLmNjFISUbA4hGaXfNjl w/jhToq9KwmLjXHp5XN1sQhg+iqfdZoIsSTsRIiHVwsu5XRzs3m4SE3iW/5uO4gntqeg 7OkDfYs+CY4Ig4X4o4bzsWcqlf3HsuTwANUPudv3K7MRUH+N7Gt6RzhRSrPaDeGzG5SD 1Xv/Z/7YWMB4mYuMCSuUoRv6J9NcFT8UqD8TGfRt0JXMN45Kgom5iFtva1+7WQJfXz45 rMjWqCh0bUFy15A5UUph+OqQd8c+CPonLCkkmZrZwWpDFuaxaVQkF6k6ccJiEzFVtFFW cneQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eIz2Zhyd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a1709064fc800b006e81dd29c00si14611460ejw.569.2022.05.22.06.33.34; Sun, 22 May 2022 06:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eIz2Zhyd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236546AbiEUOUa (ORCPT + 99 others); Sat, 21 May 2022 10:20:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244213AbiEUOU1 (ORCPT ); Sat, 21 May 2022 10:20:27 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95D1562CD2 for ; Sat, 21 May 2022 07:20:26 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id g16so12424801lja.3 for ; Sat, 21 May 2022 07:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=xrVvgGpFwC0qfTU8CkXMR2gz4gvqWYcjZfKq5E02l7I=; b=eIz2Zhyd7jFETbpfLY2ODuuP0mBnfCi4/JRwZmkwhGV8pAooU3w7uazeCICpmUBuCq Sk337CsQwzwG/8tPIY2OWFXjCh53+TBmWNdblYb7sMppqOStOhU99LVr7P6Gu8Bx855N wNBp/A9wiXOexdfSLN2KY84Jy0zm5SAOjSSrbMEvXgfKjdE+PhCrPLLcGD+ulbDUZQGK hg4jlt4BmrREyepjX7y5DcKT2kZKUkhQSHhiHVhA/hBPIDkpyKR14jFdiJBK8elV7nOL 0uPeY+PJQpIc8s8F8fKDhVvfYEnoMrR1igEwThKq2kkbRsaaoZK3G3lVDSFmLWKKm1uP NM+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=xrVvgGpFwC0qfTU8CkXMR2gz4gvqWYcjZfKq5E02l7I=; b=AsmzvESRQUb7La564YvcuWBLibIBVF5a/ccZSPH+0Ge13Mys8PkGb+ODAxaJUvaUu7 BrFxbAX5/IHn8VJSYWtdLzDRcXoxj+X6+E0acUGYbyHO6gVwTdskmr3E5L1GFY8OL97T 4T+QO4WNfn2hoYupOIEjr2VnsFHV3mH0mzDQ2t0CQVD7yVEF437S0FLJJX8CN9YGS1NZ PnnrjK6UAfYINWBH8hn01NpjqZZ0sUlYZyJQTok9xTKZE+ZYR4MgjRlxoJVmCK+SB8xP p/2rKb4SKzC07f8GS8HOBSXUlWgxhnTVulkkQRQ29NJplEjo4XWTZZJUxRvrfBDMlj/B oZFw== X-Gm-Message-State: AOAM533Wwbbo3rNhegQvubznfp8xKcACE+50GPMo5KBaiwKXSgur6If9 gNqetfqNyRUWG4uPh4SjOyht1Nd6LNztYk9D X-Received: by 2002:a2e:b1c7:0:b0:253:dfbf:56cf with SMTP id e7-20020a2eb1c7000000b00253dfbf56cfmr3680430lja.513.1653142824967; Sat, 21 May 2022 07:20:24 -0700 (PDT) Received: from [192.168.0.17] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id n6-20020a2e8786000000b0024f3d1daee3sm115913lji.107.2022.05.21.07.20.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 21 May 2022 07:20:24 -0700 (PDT) Message-ID: <023e6b0c-26a8-1563-1861-9a5cfe715c1f@linaro.org> Date: Sat, 21 May 2022 16:20:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCHv2 2/6] thermal: exynos: Reorder the gpu clock initialization for exynos5420 SoC Content-Language: en-US To: Anand Moon Cc: Bartlomiej Zolnierkiewicz , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Alim Akhtar , Linux PM list , linux-samsung-soc@vger.kernel.org, linux-arm-kernel , Linux Kernel References: <20220515064126.1424-1-linux.amoon@gmail.com> <20220515064126.1424-3-linux.amoon@gmail.com> <68969550-e18b-3c27-d449-1478b314e129@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/05/2022 11:51, Anand Moon wrote: > Hi Krzysztof, > > On Wed, 18 May 2022 at 12:58, Krzysztof Kozlowski > wrote: >> >> On 17/05/2022 20:43, Anand Moon wrote: >>> Hi Krzysztof, >>> >>> On Sun, 15 May 2022 at 15:11, Krzysztof Kozlowski >>> wrote: >>>> >>>> On 15/05/2022 08:41, Anand Moon wrote: >>>>> Reorder the tmu_gpu clock initialization for exynos5422 SoC. >>>> >>>> Why? >>> It just code reorder >> >> I know what it is. I asked why. The answer in English to question "Why" >> is starting with "Because". >> >> You repeated again the argument what are you doing to my question "Why >> are you doing it". >> > tmu_triminfo_apbif is not a core driver to all the Exynos SOC board > it is only used by the Exynos542x SOC family > > If we look into the original code its place in between > the devm_clk_get(data->clk) and clk_prepare(data->clk) > after this change, the code is in the correct order of initialization > of the clock. What was wrong with original order? You still did not explain it. > >> It was the same before, many, many times. It's a waste of reviewers >> time, because you receive a review and you do not implement the feedback. >> >>>> >>>>> >>>>> Cc: Bartlomiej Zolnierkiewicz >>>>> Signed-off-by: Anand Moon >>>>> --- >>>>> v1: split the changes and improve the commit messages >>>>> --- >>>>> drivers/thermal/samsung/exynos_tmu.c | 43 ++++++++++++++-------------- >>>>> 1 file changed, 21 insertions(+), 22 deletions(-) >>>>> >>>>> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c >>>>> index 75b3afadb5be..1ef90dc52c08 100644 >>>>> --- a/drivers/thermal/samsung/exynos_tmu.c >>>>> +++ b/drivers/thermal/samsung/exynos_tmu.c >>>>> @@ -1044,42 +1044,41 @@ static int exynos_tmu_probe(struct platform_device *pdev) >>>>> dev_err(&pdev->dev, "Failed to get clock\n"); >>>>> ret = PTR_ERR(data->clk); >>>>> goto err_sensor; >>>>> - } >>>>> - >>>>> - data->clk_sec = devm_clk_get(&pdev->dev, "tmu_triminfo_apbif"); >>>>> - if (IS_ERR(data->clk_sec)) { >>>>> - if (data->soc == SOC_ARCH_EXYNOS5420_TRIMINFO) { >>>>> - dev_err(&pdev->dev, "Failed to get triminfo clock\n"); >>>>> - ret = PTR_ERR(data->clk_sec); >>>>> - goto err_sensor; >>>>> - } >>>>> } else { >>>>> - ret = clk_prepare_enable(data->clk_sec); >>>>> + ret = clk_prepare_enable(data->clk); >>>> >>>> This looks a bit odd. The clock was before taken unconditionally, not >>>> within "else" branch... >>> >>> The whole *clk_sec* ie tmu_triminfo_apbif clock enable is being moved >>> down to the switch case. >>> tmu_triminfo_apbif clock is not used by Exynos4412 and Exynos5433 and >>> Exynos7 SoC. >> >> This is not the answer. Why are you preparing data->clk within else{} >> branch? >> > After cleanly applying the patches I see the below changes. > if you want me to remove the else part below and keep > the original code I am ok. > > data->clk = devm_clk_get(&pdev->dev, "tmu_apbif"); > if (IS_ERR(data->clk)) { > dev_err(&pdev->dev, "Failed to get clock\n"); > ret = PTR_ERR(data->clk); > goto err_sensor; > } else { > ret = clk_prepare_enable(data->clk); Which is wrong and does not make any sense. This is third question - why the main clock is prepared within 'else' branch? Best regards, Krzysztof