From patchwork Tue Jan 23 15:34:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 125543 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1828257ljf; Tue, 23 Jan 2018 07:37:53 -0800 (PST) X-Google-Smtp-Source: AH8x227g2eJJJT0iqkBI8TyhFnxe9XjqGrdkCjTRNGkHGpIByKy0qUCN+1HxTvp+yEoL/pgeajUi X-Received: by 10.107.198.86 with SMTP id w83mr3966765iof.75.1516721872990; Tue, 23 Jan 2018 07:37:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516721872; cv=none; d=google.com; s=arc-20160816; b=qMorGgFC2E9VCCRA0nir/oxjTd/5TksoSI4YNwtEZBBbevRekdgaI0bbk5r8WGrA/h 5J72+bXt2iH2BHcX6HMeJQbloTslyUGz5CTyUJKBADpBAhvoDqyMKRAjHxj5HxEajSgw gLPi9fYqDjYdQkyYGZSWv/hKtr1208OWXdsp8J5x5pFBDYqlW1yZJr9LOhXN2IY0UmxN GYf+LeG9f0rmlYa2zKPcBeaf4pKEFJvz8FYH0nzO+NQBJUqmbMSSQfm1sj/kV6vmxOJb LjgV1GgbL6qRy8zOfqcodGIdIiUFI1Bvovt/zsf1brQIqz1hk8uRmSIet9UcNCV14QXr fpZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=UckMi7dtZhalpmHgnLZADqEUWSKn04OayeolrhwQt58=; b=o3EV7Lel+GjfWve1Rp7OZxZngA4wgG34tGRbS2E0pPI7Pq5hjShYSlwQrqoUHwqe7v U/tePesYrsKgI2YC6CafSfVzDK/SY/XxDGF3fG53HyUhZvgAz/8swKZhM5EtL8ZO2L5p qCfgXvrHIMWFquHe8j/YcI8w9n6qjG8JdaNxW8jDINVGtR+B19s40vH/GAlj4680HWtp dvxYTkDJ9VHEzJ01AiswLCBBPk4OfWrLq4izK/7J0VKwe1wWi6bYSaMzoZsT6NfKrGds 8poYXQPzbDLr0L4foYfUcuOmCsPU68zLA0GPE6uGa2LwNB3CQ4Z7C594pHqEgecquOCT AP8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S+arlwrs; 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 j42si15671311iod.69.2018.01.23.07.37.52; Tue, 23 Jan 2018 07:37:52 -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=S+arlwrs; 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 S1752225AbeAWPhw (ORCPT + 28 others); Tue, 23 Jan 2018 10:37:52 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:45149 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbeAWPf1 (ORCPT ); Tue, 23 Jan 2018 10:35:27 -0500 Received: by mail-wm0-f65.google.com with SMTP id i186so2635609wmi.4 for ; Tue, 23 Jan 2018 07:35:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UckMi7dtZhalpmHgnLZADqEUWSKn04OayeolrhwQt58=; b=S+arlwrsDnls4y68i8+vt1O2A/zByUOym0YCW+NPHHeb7BnRBq4TlmaksYLb/Tef2H UF1wvsqJYeoxbXMX+l3JxFluxp1n77P/7onpjIs82knrOLRzWoPjgsidMIKQncbmig4B YSQ5pD0YwQ6HdWJkbIc1bfF87Ix90MOEFCmTE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UckMi7dtZhalpmHgnLZADqEUWSKn04OayeolrhwQt58=; b=gTkqJ9RBwzUi1TbQxBCmF8dJLZeTWV5drLEGm34+UJtwZ04PizKU3A1WxXCivsKXwx nKiXy81uGP6IG+55mUsXl1Gjv+r1HTUAV/1wQ98943tgCJYr/cJxPCJXy9tBYjzGAYK7 eb3kKN+miW8rnOEmEW1lB/KbqMc/AAqy2WgBQST9AE5NChpA70vGbYGBYBkQvyVR2sem n429lxkHZ9eRBzOnJ5r8ccNSHCA6d3SKoeQu4vud60il0FVlxWHZ2QcJfZxcfDljfuXF 1D2TYcE9n+Y5s5bSBVyV1QF4LNGyAmKz3LaqyWf1hGi/mfgcRZD6y7VzEOWMAbWc0ZTw ADzA== X-Gm-Message-State: AKwxytfi5q6/w+buGI88PDpRBlgRAbx/jLlkkvNNGLv3N6HwZ6bmkJUw m97VWCe7Tdxoe4SZl0qaoqd4AQ== X-Received: by 10.28.168.8 with SMTP id r8mr2421317wme.157.1516721726406; Tue, 23 Jan 2018 07:35:26 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:8138:f09d:5869:1250]) by smtp.gmail.com with ESMTPSA id o98sm915624wrb.19.2018.01.23.07.35.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jan 2018 07:35:25 -0800 (PST) From: Daniel Lezcano To: edubezval@gmail.com Cc: kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, Javi Merino , Zhang Rui , linux-pm@vger.kernel.org (open list:THERMAL/CPU_COOLING) Subject: [PATCH 3/8] thermal/drivers/cpu_cooling: Remove pointless field Date: Tue, 23 Jan 2018 16:34:26 +0100 Message-Id: <1516721671-16360-4-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> References: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 Acked-by: Viresh Kumar 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);