Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp1377868imk; Mon, 4 Jul 2022 01:41:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ss7Qf4vm8QMLeaTe162ODRmadPBwvPHlgprQM6p+ZUwtjNkN31rqpkJd4EGd/43WLfwO3w X-Received: by 2002:a17:907:60c8:b0:726:d5c1:385c with SMTP id hv8-20020a17090760c800b00726d5c1385cmr26369896ejc.490.1656924072865; Mon, 04 Jul 2022 01:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656924072; cv=none; d=google.com; s=arc-20160816; b=XVmDUIqL4Q0icyfPKlZZAr1SCnP+5xnA22oiBzC5lrxfMApp8vklRnybkeZVzF6Xoq IQaSes7Bmxr2/2Hw3enZgL55gB0kLNdxWzuIoNwBoJ2Lv1VZgT+4hyfOaHC3zA6+nJzy 15B3pcloDMbdy/YBzhtqyI+lbj+0KgYoAgvdeIIsMcXG9gFr/YIzOfkBn6wbz9MdVtSw 319YLMURDGFfx24MF10iMNs5Cvvi6Loo9rrYHz+Vgx67RVBo3CnCJ2jpFh7HqxLngYW2 DnO4Y7aPROj/oNslY4nDlndgczHSn28s9JQ3/Qftp8yUuVVnD5eRluzhk+h0jd7RIH8Z mToQ== 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; bh=mFwe7NwoxTcu/VP+mgU52NONdshjmvp/DpMqVhYZwqk=; b=rucToPoT0Af/z4m5LfHskdKYM4zy5yDtDWOuzOm5aPc6xKR+jKPWFjlP8SqJuc9NNY 6gq95qBHpAeXXaCVbq2A2B9gRlVJOM9HPdHNb2UXiFBbeWiKG+3VjtCY/6+SLYcQXuKg lhEBr/Tr8MILlL814pBxY0OXNJh09o2yQyMtHcWYoqa0l26AkYdkmqHLd+tRH2n1jdjB i/6j97uJBPy2OR1qZHz20WE44kyn8O2G4Qu/5QXmuo1BKFl10VBr+J6t89SIOVazMMua +NrOMAmp/y7W3e9pJc+uJkrKcOHskj2fsiNNKmhFGj5Ma7FbHP6B7LdSDfgxVEGqnGgB B56g== 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn19-20020a17090794d300b00715702f1e9esi7031541ejc.799.2022.07.04.01.40.48; Mon, 04 Jul 2022 01:41:12 -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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232268AbiGDIi4 (ORCPT + 99 others); Mon, 4 Jul 2022 04:38:56 -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 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,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 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