Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp305699rwb; Mon, 26 Sep 2022 12:37:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yNCB4yXJj//rGxwHUwkfnUzQsmi2z2C8Ew/prS4FZccdO1XH4S3y4SCj4MlW0Qg/R1ZMG X-Received: by 2002:a17:90b:3504:b0:202:7253:9b53 with SMTP id ls4-20020a17090b350400b0020272539b53mr358446pjb.155.1664221028708; Mon, 26 Sep 2022 12:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664221028; cv=none; d=google.com; s=arc-20160816; b=vUOGeTveO5l60ckw2wm1fAzDHpAH1uY6sne57onNuanxUwEGv2c3b/Qn4IQeSZw/ms RoJjkQPLl8GUZq5/LwxAcIXwx9H9M+20cY4H8ahhw7b7v71GQjh32LjwpMT2Z3Xec2zL ZUhGcKELR5fvzM19wI5tkVJY8PGiWZgcWNhJcLgx5A7fkjm+/Y0RcGpwQ5AGcbjKmtMp QvAVx0vPOu++LXNoSt51e3Qaz2usNFm6lik3PuFKZ7KTCYpQ616qi9mfBDIBhpeJjSkw gYlh+KId/Us+fA9srF1Gpqb3L4O69trXg7uk1q7YZYg9FoZvZV7GFDcK9ezOm3OLeJ7G B5ow== 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; bh=5Y3qxibv8l/fmxXFEFy17abcwdGsCVgDmmM76oi7nSE=; b=Cga89ALiwep6BG8JDT9no9m8UDYbFjnOElLDxm+8COCt937SMpgmvsaEyHXRnDXSDB 0a/7psDDD/XexT8foJF9sTDC3td4qFZBcKQvQigKfytfcqkD5k0SX8rSTIHMVO2AEnSH Q36ILb/OWXJOZu8mwuxbp9FcAMlrC9MtVP+IDaWNgtvE/n9fe88Em8Ln5q8G4cAw5pO0 A3OqlWPZxBAkc6RsoMrqQhh1EY+sG6FnO23R4Ig/lwTWEyc+q1lbOjTCGgE/GWqZpYFU jivxh1f7hLR3tf+YFfkwJu7e3Fyeyq6HEKh+TVIgoDokNd5VSnHeS8zMxPhGLpaimOq6 Ym0g== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a056a00114700b0053e9c7939basi15603906pfm.188.2022.09.26.12.36.56; Mon, 26 Sep 2022 12:37:08 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229928AbiIZT2O (ORCPT + 99 others); Mon, 26 Sep 2022 15:28:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbiIZT2M (ORCPT ); Mon, 26 Sep 2022 15:28:12 -0400 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C5BC5AC47; Mon, 26 Sep 2022 12:28:11 -0700 (PDT) Received: by mail-qk1-f171.google.com with SMTP id i17so1789257qkk.12; Mon, 26 Sep 2022 12:28:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=5Y3qxibv8l/fmxXFEFy17abcwdGsCVgDmmM76oi7nSE=; b=Taj7mhtuGddrPjZ57L+BWeKA9jh5eim15erKp3/PtsJC4cxVRvkF36ulI9igS9rlqs CPm5R6wWqOCDNVgOqytkqH7ScYqkjSv479W5wcURCvc6ZrSQ2P+Q2DXyBFzjeeHPXK4z TDI+HEc1oBnS1Eitmaw6k5X3KANYS4tOAh+Qg0UYGcbQboFsDy4W9pWc3l6qgSmz5ngB Gg5wsa14h8g4A1Aq8YLcxM5/9hFqtjxJUI43qq3Ir8th9NYsAGqW6bPi/PO0xupCSvvz jgATWzdoTb70wfShJHs7mMZWrVvSJGL95fnUT9tmNZBgCdQ+j8sEqjRSTjfgN61E2bJs iKFQ== X-Gm-Message-State: ACrzQf23WkMPgX0Nx58jbfpxaNb+ubbtHevtXcyg0VEk8WgT+7gYxDBD Jz0DWGJ+9CyEn1yGGNeBCZVFQh1zjAVH/RcT8ZQ= X-Received: by 2002:a05:620a:290d:b0:6b6:1a92:d88a with SMTP id m13-20020a05620a290d00b006b61a92d88amr15599970qkp.58.1664220490587; Mon, 26 Sep 2022 12:28:10 -0700 (PDT) MIME-Version: 1.0 References: <20220926140604.4173723-1-daniel.lezcano@linaro.org> <20220926140604.4173723-5-daniel.lezcano@linaro.org> In-Reply-To: <20220926140604.4173723-5-daniel.lezcano@linaro.org> From: "Rafael J. Wysocki" Date: Mon, 26 Sep 2022 21:27:59 +0200 Message-ID: Subject: Re: [PATCH v5 04/30] thermal/core: Add a generic thermal_zone_get_crit_temp() function To: Daniel Lezcano Cc: "Rafael J. Wysocki" , Linux Kernel Mailing List , Linux PM , "Zhang, Rui" , Amit Kucheria Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 On Mon, Sep 26, 2022 at 4:06 PM Daniel Lezcano wrote: > > The thermal zone ops defines a callback to retrieve the critical > temperature. As the trip handling is being reworked, all the trip > points will be the same whatever the driver and consequently finding > the critical trip temperature will be just a loop to search for a > critical trip point type. > > Provide such a generic function, so we encapsulate the ops > get_crit_temp() which can be removed when all the backend drivers are > using the generic trip points handling. > > Signed-off-by: Daniel Lezcano > Reviewed-by: Zhang Rui > --- > include/linux/thermal.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/linux/thermal.h b/include/linux/thermal.h > index 5350a437f245..66373f872237 100644 > --- a/include/linux/thermal.h > +++ b/include/linux/thermal.h > @@ -343,6 +343,8 @@ int thermal_zone_set_trip(struct thermal_zone_device *tz, int trip_id, > > int thermal_zone_get_num_trips(struct thermal_zone_device *tz); > > +int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp); > + Well, this only adds a function header which by itself is not particularly useful (and the code change doesn't match the changelog even), so I would fold it into the patch that actually adds the function, including its body. > #ifdef CONFIG_THERMAL > struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, > void *, struct thermal_zone_device_ops *, > -- > 2.34.1 >