Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp1371705imk; Mon, 4 Jul 2022 01:31:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sH6J5gxNKFY+K/vzVI+YBzvZhEqAU0E7wTDWv29GIcVP9eV1h8rRW8R5SB4O/ROwiS9Vki X-Received: by 2002:a17:90b:1644:b0:1ef:88c6:6e39 with SMTP id il4-20020a17090b164400b001ef88c66e39mr4212137pjb.122.1656923477423; Mon, 04 Jul 2022 01:31:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656923477; cv=none; d=google.com; s=arc-20160816; b=ikZ1yZWHLjzttH8X92WhIlG1hLTTz8v5GtA4nOaCo9oWGMln1V7WV7ddsjp3zRk/F6 kbGtnoWR+L5APMenCkE1zDoMOiCnNCjH207vI2ci1jj05CZtwbkSEKv68K7Oh1o27Qu0 lW8OBw76kPLx0Ioo9t+pAnu+cJ3IjmH9wzrx+uZMoPTyFj9IsqN75qmRkU/9TFuD34Pr 2TS6hKSW1IW82o2mdxbaT/YzX0DyVM1DNWxjZS5GXKJlFsTOZWsEwpkcm06/YRB3TTxr 65B8W1yQpGI2NT++CUC4JiYZ8YOI8EXXFLuBWFcyA08QIiydL2laP9tHEPZ1PEC07bjC hPNw== 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=Ffqzbw5ha5nBV560PzJFDCcI0t11PvLgcp9biGiu2q0=; b=corkJ2vfjbSLiIAWO0n2knupSo8sDzpZf0OWV2VGuGjThxKE9qwE8w++JXVi+6mZ56 nT54A+TLaY8bc0VcFZi4WNYvvl1/3mSC2C6AupUDz+lAoZTv0ve044nfIwLkSb/aOz42 ArYaJSuqNQ+Mc7oZV6oLFTpmromR/Ny2uuoDPDXWDhpcNYXzi+3veckCTyrGC+WH+TQs VMSP4suUqrj6iAKaF6MMUR8F1cQ3GLnTemhMbEVac9lrpMwYf7wEdmMASCRmWqSqXyfu GnHfKvVFybvJn3RCb5QTqCs6I61CnbkjEhbFfyX70XkQRPN3SRvIXDJLQdlAVHODCzYZ Lrzw== 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 t32-20020a632260000000b0040d3169289esi36884975pgm.445.2022.07.04.01.31.04; Mon, 04 Jul 2022 01:31:17 -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 S232403AbiGDIBq (ORCPT + 99 others); Mon, 4 Jul 2022 04:01:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230505AbiGDIBp (ORCPT ); Mon, 4 Jul 2022 04:01:45 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CFDB5AE50; Mon, 4 Jul 2022 01:01:44 -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 E76FE23A; Mon, 4 Jul 2022 01:01:44 -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 1BEA93F792; Mon, 4 Jul 2022 01:01:42 -0700 (PDT) Message-ID: <88ce3064-8a98-c7eb-a77b-fcd5b03db330@arm.com> Date: Mon, 4 Jul 2022 09:01:42 +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 03/12] thermal/of: Remove the device node pointer for thermal_trip 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-4-daniel.lezcano@linexp.org> From: Lukasz Luba In-Reply-To: <20220703183059.4133659-4-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: > The device node pointer is no longer needed in the thermal trip > structure, remove it. > > Cc: Alexandre Bailon > Cc: Kevin Hilman > Cc; Eduardo Valentin > Signed-off-by: Daniel Lezcano > --- > drivers/thermal/thermal_core.h | 2 -- > drivers/thermal/thermal_of.c | 8 -------- > 2 files changed, 10 deletions(-) > > diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h > index 726e327b4205..ff10cdda056c 100644 > --- a/drivers/thermal/thermal_core.h > +++ b/drivers/thermal/thermal_core.h > @@ -70,13 +70,11 @@ void __thermal_cdev_update(struct thermal_cooling_device *cdev); > > /** > * struct thermal_trip - representation of a point in temperature domain > - * @np: pointer to struct device_node that this trip point was created from > * @temperature: temperature value in miliCelsius > * @hysteresis: relative hysteresis in miliCelsius > * @type: trip point type > */ > struct thermal_trip { > - struct device_node *np; > int temperature; > int hysteresis; > enum thermal_trip_type type; > diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c > index 04c910ca8623..16eb18c24430 100644 > --- a/drivers/thermal/thermal_of.c > +++ b/drivers/thermal/thermal_of.c > @@ -867,10 +867,6 @@ static int thermal_of_populate_trip(struct device_node *np, > return ret; > } > > - /* Required for cooling map matching */ > - trip->np = np; > - of_node_get(np); > - > return 0; > } > > @@ -1000,8 +996,6 @@ __init *thermal_of_build_thermal_zone(struct device_node *np) > > kfree(tz->tbps); > free_trips: > - for (i = 0; i < tz->ntrips; i++) > - of_node_put(tz->trips[i].np); > kfree(tz->trips); > of_node_put(gchild); > free_tz: > @@ -1026,8 +1020,6 @@ static __init void of_thermal_free_zone(struct __thermal_zone *tz) > } > > kfree(tz->tbps); > - for (i = 0; i < tz->ntrips; i++) > - of_node_put(tz->trips[i].np); > kfree(tz->trips); > kfree(tz); > } Reviewed-by: Lukasz Luba