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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8521C25B4E for ; Tue, 24 Jan 2023 11:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234052AbjAXLbg (ORCPT ); Tue, 24 Jan 2023 06:31:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234048AbjAXLb3 (ORCPT ); Tue, 24 Jan 2023 06:31:29 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FDAB3D909 for ; Tue, 24 Jan 2023 03:31:27 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id n7so13556981wrx.5 for ; Tue, 24 Jan 2023 03:31:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=jLLfocHfbHOL40uUXPgns0rpEqz3nPLXX2K2rRvVLrg=; b=DEXRUatr5utyB4EOK86e5LPurvKMapMmZDc2v0HM/kq1oNFxjcQzYCAx+ndneN4ERl 0gDqmzKRQUJfHs/DacPephHXPIXVd2mHWDXz2sfNKlZkM67sgHgkihsWuhZLGyMaMFO1 WVVwOvO0NWp3ZjRjsQwzCLi1MUrwf7dtefhaKkG9NPRRI1taxdIZ0h1tyZhXnr6bYiiI vr1CNLkQCgboDgT6uX51SCYemrxdhugTyM1DEX7W54H17bg2fiAYdWuwM+vdE5++R/WK 3C26A6hIHVVhGe/Ez9hcZs8CRPPvfjeunNQGSq+xihDWl7tOTorthvz8rxJyXlVv+GKB wRLQ== 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=jLLfocHfbHOL40uUXPgns0rpEqz3nPLXX2K2rRvVLrg=; b=I8HZYmK/wXEHgZ+wb9GjD5O/O2UKysjdGvJndkMM0Ws1HKyLoRvZu3pctXAe6Dt+pR DsMpLqM/84C2PFNubJNe8prhCGxq/hfdgWYiNBWiYws1RwKJm+fuhbdDVlF93UyCbCAR GY5Xm4XbGvUe9D0/GxcTqcgSWGJPEiYA55uUtSkKI4q4Du3e5EJf0T4XWCwpQux+P2lo ZS2H0ElxE7dMmfWP0xqlaQFkcpXIpD+emYcZ/7VzeBHZk4HF2ucZsI7TtGgIAgOu7oXh d+kpQuT3oL4+TdEdn6q4gICIRV9L9WuOYpG/Sol28zfEdb1egcMYAbgbZffXIeKzEznP 4hJQ== X-Gm-Message-State: AFqh2kpxOfkmcytwFOVlPM0GfXyE821gSgHvJ24CR5tvZrq8BcZ3Pzh6 oKgBVUwh6nUiSPmIF9eON4ZfEg== X-Google-Smtp-Source: AMrXdXvjHkzAnZJ0fbZHcGRpy4aZpsopasdvyrp+0Xf7BVvh20Ocf8+v5SFmLRtxn0FLI76/7f6/TQ== X-Received: by 2002:adf:f890:0:b0:2be:5a87:7727 with SMTP id u16-20020adff890000000b002be5a877727mr12963183wrp.15.1674559885893; Tue, 24 Jan 2023 03:31:25 -0800 (PST) Received: from [192.168.10.46] (146725694.box.freepro.com. [130.180.211.218]) by smtp.googlemail.com with ESMTPSA id t14-20020a5d690e000000b002bdd96d88b4sm1627451wru.75.2023.01.24.03.31.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Jan 2023 03:31:25 -0800 (PST) Message-ID: <3bcd80e7-5934-ca8d-ac86-9bc5b3a8a6ef@linaro.org> Date: Tue, 24 Jan 2023 12:31:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] thermal/drivers/armada: Use the thermal_zone_get_crit_temp() Content-Language: en-US To: Miquel Raynal Cc: rafael@kernel.org, Amit Kucheria , Zhang Rui , "open list:THERMAL" , open list References: <20230118222610.186088-1-daniel.lezcano@linaro.org> <20230124120458.412fc528@xps-13> From: Daniel Lezcano In-Reply-To: <20230124120458.412fc528@xps-13> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miquel, On 24/01/2023 12:04, Miquel Raynal wrote: > Hi Daniel, > > daniel.lezcano@linaro.org wrote on Wed, 18 Jan 2023 23:26:10 +0100: > >> The driver browses the trip point to find out the critical trip >> temperature. However the function thermal_zone_get_crit_temp() does >> already that, so the routine is pointless in the driver. >> >> Use thermal_zone_get_crit_temp() instead of inspecting all the trip >> points. >> >> Signed-off-by: Daniel Lezcano >> --- >> drivers/thermal/armada_thermal.c | 38 +++++++++++++------------------- [ ... ] > > Makes sense. > > Nit: I would actually put that comment in the commit log rather than > keeping it in the code, but whatever, that's a nice simplification. Ok, I'll do the change. >> + armada_set_overheat_thresholds(priv, temperature, 0); >> + priv->overheat_sensor = tz; >> + priv->interrupt_source = sensor_id; >> + armada_enable_overheat_interrupt(priv); >> >> - return -EINVAL; >> + return 0; >> } >> >> static int armada_thermal_probe(struct platform_device *pdev) > > LGTM so, > > Reviewed-by: Miquel Raynal Thanks for the review -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog