Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1671932ioo; Sun, 22 May 2022 23:51:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJHj6YWVE85zusZZxsmE4Bo7crNyNPlUobGHFc0+5Zsnvh8t25TKjfVWiuSWy2zUsmJnhw X-Received: by 2002:a17:903:1211:b0:15e:8208:8cc0 with SMTP id l17-20020a170903121100b0015e82088cc0mr21979412plh.52.1653288670557; Sun, 22 May 2022 23:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653288670; cv=none; d=google.com; s=arc-20160816; b=NhLuYdmGnGEVfBLMob79E5G6cnbO4aqQDDfFn7HUzMUMDWKkNXzQXJgQSm7QMbOU7S T/ciskI3CHP4uTB3tEVn6rBhlWlKW0yB0wsuR+d2PDwoAKju2Gl1i9AExpabYQsi6pfT tqT8TPP2S3F9wDB5ijoTQbYI+u6hEnnkIkIkX+gV0vvyktc4D1JJBMVXA2LTPLUPV4Ff NrvYs2NgRNsd3QwZha7Lgs/butjI3egg9NDrnOFagU5iCKLoHWpxSxZ7TYv5AM5a1G5e SXAdaDm+MmMEobPqnDFpz4kCpiKWbVg6PptwQAI2grztm1TuXhBFXqLtHl8cPjIERNRN jxFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6tJ3wJ8Zdt9XhT+IGej+mRCHHGWY+7eB7aTqh81bNi8=; b=gnKGadS8q6XYx5uWW7khizxLABhyFEMbtc6Y+CAkr5qkA1Ckya+/0WfiW3fB4CgbbN 253IJkDuuru7Rj/abTvVnXdlfBxtm6ZxkFvfnccd3zi9XuKBCG5YDI1MQ7ihrrLnDDYt OCN0fREKgtu9U2yXBqbhtKDopX/I4ojQOqAlKzs1UEutHUCgapNoOqDofH/nPC8Kshw2 ajP2GMwq8RKqRYjlcWMtrDXe+GaxsMZUN7Cfq8JKwJPS8b5aeuasnX9fBJJ8intV6WZA StOyEcQ0Ha79Mq9Dc5SWfyRhpBPqjyZU8afZWg9TDgmLRPqyV79+WCMD3r7r0hhwksLq fz4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LyKHvjiT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k11-20020a170902ce0b00b001569af11990si9928577plg.507.2022.05.22.23.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:51:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LyKHvjiT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EF9FF5402B; Sun, 22 May 2022 23:19:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234381AbiEUJvf (ORCPT + 99 others); Sat, 21 May 2022 05:51:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349907AbiEUJvc (ORCPT ); Sat, 21 May 2022 05:51:32 -0400 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 723225641D; Sat, 21 May 2022 02:51:26 -0700 (PDT) Received: by mail-il1-x12a.google.com with SMTP id o16so6937650ilq.8; Sat, 21 May 2022 02:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6tJ3wJ8Zdt9XhT+IGej+mRCHHGWY+7eB7aTqh81bNi8=; b=LyKHvjiTTQZlpIxlbYhPoU3iF4IPHjf5NxfrVW0hpfFsehOhGhCIJczX4JQKRp/nPG KaZwT4/Rb/0q/EKYnsoIbRMvkrAX2ExjwWxHQTUz62Ji69/ZnIdxsVzQvPJGQCRAzxGQ gf9tFfL3MhP8OKerXF+IYanIZAj2Wq34WMd6ZYwiVPatmXe+li8F47gi8EJ1b3ytiwcf fH4PFv8YN1eeswtZN2UyswJljiaoYqyGsvXlnYb1PWRkJBnU1QytXWz6QRUfMLieq4Qw Xh56V2XHPtXgwCM0znK/T6NTWsz6gnbqutSX3A1T1DuWF7M8IU5Xk6RHELxJmFB7ac6H VVDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6tJ3wJ8Zdt9XhT+IGej+mRCHHGWY+7eB7aTqh81bNi8=; b=HV9Oy/uNVPRMppWMRDmONnjpS/Z2wwbR6I+BclnYFIi/OwgEuOErhaSp6rWWphCJIp j/fUOzJsiFIme3PaJzh12Lw6GT1MOwSf4hOu1tw5V810JIm8naeMsqqn8cTyzgJrW+ro +o6flMg37HwLBBDQpClVpPN//xfNkZKw5xaRI5ZNezbHLnSoaoN1zZDw74nljDAvr6NZ BXkNFkPKv8qD8XsY/c08YPAIHEId6oMBHfeqZMNpEhvVls34zo5U4Y1xf2Unj3SvEKmI j23NqQRdQGoOkhzEMPelGHFn6POxRgoyrLDftHXbAfw0IOXHm0bZq+sv/Bg4HJxEDcgT AhgQ== X-Gm-Message-State: AOAM530Zf4OsZkihjbsdEzZINW5ZJipuKlDKNJmn3URhi+Cn0yRHbLS3 MHdbXWG1wmZiuTZYqpvxf9+iIIKxW3TXDh85RoM= X-Received: by 2002:a05:6e02:188a:b0:2cf:7adc:7a86 with SMTP id o10-20020a056e02188a00b002cf7adc7a86mr7468132ilu.276.1653126685896; Sat, 21 May 2022 02:51:25 -0700 (PDT) MIME-Version: 1.0 References: <20220515064126.1424-1-linux.amoon@gmail.com> <20220515064126.1424-3-linux.amoon@gmail.com> <68969550-e18b-3c27-d449-1478b314e129@linaro.org> In-Reply-To: From: Anand Moon Date: Sat, 21 May 2022 15:21:09 +0530 Message-ID: Subject: Re: [PATCHv2 2/6] thermal: exynos: Reorder the gpu clock initialization for exynos5420 SoC To: Krzysztof Kozlowski 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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. > 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); if (ret) { dev_err(&pdev->dev, "Failed to get clock\n"); goto err_sensor; } } switch (data->soc) { case SOC_ARCH_EXYNOS5420_TRIMINFO: data->clk_sec = devm_clk_get(&pdev->dev, "tmu_triminfo_apbif"); if (IS_ERR(data->clk_sec)) { dev_err(&pdev->dev, "Failed to get triminfo clock\n"); ret = PTR_ERR(data->clk_sec); goto err_clk_apbif; } else { ret = clk_prepare_enable(data->clk_sec); if (ret) { dev_err(&pdev->dev, "Failed to get clock\n"); goto err_clk_apbif; } } break; case SOC_ARCH_EXYNOS5433: case SOC_ARCH_EXYNOS7: data->sclk = devm_clk_get(&pdev->dev, "tmu_sclk"); if (IS_ERR(data->sclk)) { dev_err(&pdev->dev, "Failed to get sclk\n"); ret = PTR_ERR(data->sclk); goto err_clk_sec; } else { ret = clk_prepare_enable(data->sclk); if (ret) { dev_err(&pdev->dev, "Failed to enable sclk\n"); goto err_clk_sec; } } break; default: break; } > > Best regards, > Krzysztof Thanks and Regards -Anand