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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A763C433EF for ; Mon, 4 Jul 2022 08:38:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232637AbiGDIiz (ORCPT ); Mon, 4 Jul 2022 04:38:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232569AbiGDIiy (ORCPT ); Mon, 4 Jul 2022 04:38:54 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 88529B7C0; Mon, 4 Jul 2022 01:38:53 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9CACC23A; Mon, 4 Jul 2022 01:38:53 -0700 (PDT) Received: from [192.168.33.14] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C4A693F792; Mon, 4 Jul 2022 01:38:51 -0700 (PDT) Message-ID: Date: Mon, 4 Jul 2022 09:38:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3 10/12] thermal/of: Store the trips in the thermal zone Content-Language: en-US To: Daniel Lezcano , daniel.lezcano@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, abailon@baylibre.com, Amit Kucheria , Zhang Rui , rafael@kernel.org References: <20220703183059.4133659-1-daniel.lezcano@linexp.org> <20220703183059.4133659-11-daniel.lezcano@linexp.org> From: Lukasz Luba In-Reply-To: <20220703183059.4133659-11-daniel.lezcano@linexp.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On 7/3/22 19:30, Daniel Lezcano wrote: > As the thermal zone contains the trip point, we can store them > directly in the when registering the thermal zone. That will allow 'directly in the' is there something missing? maybe: in the thermal zone when registering > another step forward to remove the duplicate thermal zone structure we > find in the thermal_of code. > > Cc: Alexandre Bailon > Cc: Kevin Hilman > Cc; Eduardo Valentin > Signed-off-by: Daniel Lezcano > --- > drivers/thermal/thermal_of.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c > index 16eb18c24430..16b6b90a2390 100644 > --- a/drivers/thermal/thermal_of.c > +++ b/drivers/thermal/thermal_of.c > @@ -1117,11 +1117,9 @@ int __init of_parse_thermal_zones(void) > tzp->slope = tz->slope; > tzp->offset = tz->offset; > > - zone = thermal_zone_device_register(child->name, tz->ntrips, > - mask, tz, > - ops, tzp, > - tz->passive_delay, > - tz->polling_delay); > + zone = thermal_zone_device_register_with_trips(child->name, tz->trips, tz->ntrips, > + mask, tz, ops, tzp, tz->passive_delay, > + tz->polling_delay); > if (IS_ERR(zone)) { > pr_err("Failed to build %pOFn zone %ld\n", child, > PTR_ERR(zone)); 'num_trips' ? Apart from that LGTM