Received: by 10.223.176.5 with SMTP id f5csp880406wra; Tue, 30 Jan 2018 21:22:03 -0800 (PST) X-Google-Smtp-Source: AH8x227vj7tnV82FlSEQRPVKXpncYdXzeBgA0VbDnAWlVkiIGyPYWIYlKqNuMvv8tUgf0NPM+lbF X-Received: by 10.98.192.10 with SMTP id x10mr32890318pff.27.1517376123430; Tue, 30 Jan 2018 21:22:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517376123; cv=none; d=google.com; s=arc-20160816; b=pM9Gupoxkc1itR9aQXka+myIib+PS4g338t2wtBmFqUlVDGwN+3OoG86Msy9TWFbd0 HjjtkCF/B4TTtZUPKPkUT3LNYSBy1bZ38tdXLD3Zlr390GP31iMxz8wkEPo/orsjDUhK L5YXzu61XZfTr7uQMrZ0//94EGYaJaucczhqOKSqVVHcQYN5Vkli9fa9JqROIrXxABbh xtDSSRvpWoMqMs5ZVe0w7pVYYl8t/PHbJqHYmpZdErcvYIFyPrqzqmFh6JMNqxp+BkN/ WIsqsktAvM8dJ6zxptRd6ersYFNH+yWNc/vL3T22Hy0TLfkA39LrdYbbDKjPdyVANv8X /zDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=8GODK+t6jPMfKWmMrBo+/PpLPAJd3q4a+JKhsB6a/Pc=; b=YwFvwnqUwTyFZOsRq2TvaBoz1oDxJdU+MhV1f3AXjyynAqGhAZQmslQZe+LinEUp0H KzZUZIDFqcJDHFQ1BQpH+j+mAeA+x1THTlCp//2xdorkaUE2i6e+uu7TtqRc04+U8YJ8 DblUwufLRtLJ3/sczJ788GhkWVGghwrM9PTkzuQdH5vtzRAETQjz0KExphr+NMMMWKMM KxyDVwKLfgJ4VU4sdqdCHFEuydNoF/8NaeOycW3fWjIkTurtVSZ9xHCno/91L41lz6wj WRq4UzWBxZo8d9l6vHlpVMkYwcEld9t+GcY8fGh/QnAukcont2gNakTgWrjbLVpsKqAZ RUbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z6oFnPyt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d63si3114659pfk.73.2018.01.30.21.21.49; Tue, 30 Jan 2018 21:22:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z6oFnPyt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751320AbeAaFU6 (ORCPT + 99 others); Wed, 31 Jan 2018 00:20:58 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36761 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750705AbeAaFU4 (ORCPT ); Wed, 31 Jan 2018 00:20:56 -0500 Received: by mail-pg0-f65.google.com with SMTP id k68so9170973pga.3 for ; Tue, 30 Jan 2018 21:20:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8GODK+t6jPMfKWmMrBo+/PpLPAJd3q4a+JKhsB6a/Pc=; b=Z6oFnPytpBNIy6Xj4c+R9nx6dS1ertuIjL3Eys47o7Fe+Y5UYe8DUE1BUNa1oaW+WP PGjI8h/X8yoXkEYHPm5UXoev76htkRBGS+bwlpiTApBZaa8eGzb5UsWOMxphea7rSYxl +01Rmp0GaTH2M8KDyZgztuM5+4ATGtmZSj87Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8GODK+t6jPMfKWmMrBo+/PpLPAJd3q4a+JKhsB6a/Pc=; b=Sy6pzLUukXYfdM87/iB9gu4yr8IEkYYzm5nvSTSFAocauTvU0JdeTfHVPgyQpTWRMb HdrlgpFKiLg437xTrdlaMzI8AB6FoBI8PBevtAIr0QAi+vE+cz4t49D0xi6Zd5NdJb/p +vapAIP3qeIMEDuWkw/67OYdAl4BDsqmE/v6F5jBpQujECJOPTt1CpTtZQqSKOcrtb7G JjxydpkhZJ+vJlKjLt8iovthA+nv3aCilEodjMPPyCg0LqVu4WiItpIwJ+zaLJAblF4D EkOu+1rOvNXTy6zwJ5wvrltEfc3kqzL3FyxDVlfuS68s3GpFiLTUzwIbx1zsXizpn+Pa 7IHA== X-Gm-Message-State: AKwxytegYxGSdpRUyfSeCUY8rW8bARa75SBEXPnz7BEmhrlMlBoMkziw rMV0qckyZn+x97x31bYLgM4uZA== X-Received: by 2002:a17:902:12f:: with SMTP id 44-v6mr25988155plb.403.1517376056026; Tue, 30 Jan 2018 21:20:56 -0800 (PST) Received: from localhost ([122.172.75.97]) by smtp.gmail.com with ESMTPSA id 77sm35541974pfc.187.2018.01.30.21.20.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 21:20:55 -0800 (PST) Date: Wed, 31 Jan 2018 10:50:53 +0530 From: Viresh Kumar To: Daniel Lezcano Cc: edubezval@gmail.com, kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, linux-kernel@vger.kernel.org, Javi Merino , Zhang Rui , "open list:THERMAL/CPU_COOLING" Subject: Re: [PATCH 3/8] thermal/drivers/cpu_cooling: Remove pointless field Message-ID: <20180131052053.GI13395@vireshk-i7> References: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> <1516721671-16360-4-git-send-email-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516721671-16360-4-git-send-email-daniel.lezcano@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23-01-18, 16:34, Daniel Lezcano wrote: > The structure cpufreq_cooling_device provides a backpointer to the thermal > device but this one is used for a trace and to unregister. For the trace, > we don't really need this field and the unregister function as the same > pointer passed as parameter. Remove it. > > Signed-off-by: Daniel Lezcano > --- > drivers/thermal/cpu_cooling.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c > index e62be75..d05bb73 100644 > --- a/drivers/thermal/cpu_cooling.c > +++ b/drivers/thermal/cpu_cooling.c > @@ -88,7 +88,6 @@ struct cpufreq_cooling_device { > unsigned int clipped_freq; > unsigned int max_level; > struct freq_table *freq_table; /* In descending order */ > - struct thermal_cooling_device *cdev; > struct cpufreq_policy *policy; > struct list_head node; > struct time_in_idle *idle_time; > @@ -197,8 +196,7 @@ static int update_freq_table(struct cpufreq_cooling_device *cpufreq_cdev, > > dev = get_cpu_device(cpu); > if (unlikely(!dev)) { > - dev_warn(&cpufreq_cdev->cdev->device, > - "No cpu device for cpu %d\n", cpu); > + pr_warn("No cpu device for cpu %d\n", cpu); > return -ENODEV; > } > > @@ -762,7 +760,6 @@ __cpufreq_cooling_register(struct device_node *np, > goto remove_ida; > > cpufreq_cdev->clipped_freq = cpufreq_cdev->freq_table[0].frequency; > - cpufreq_cdev->cdev = cdev; > > mutex_lock(&cooling_list_lock); > /* Register the notifier for first cpufreq cooling device */ > @@ -922,7 +919,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) > cpufreq_unregister_notifier(&thermal_cpufreq_notifier_block, > CPUFREQ_POLICY_NOTIFIER); > > - thermal_cooling_device_unregister(cpufreq_cdev->cdev); > + thermal_cooling_device_unregister(cdev); > ida_simple_remove(&cpufreq_ida, cpufreq_cdev->id); > kfree(cpufreq_cdev->idle_time); > kfree(cpufreq_cdev->freq_table); Acked-by: Viresh Kumar -- viresh