From patchwork Wed Feb 21 15:29:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 129083 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp750384ljc; Wed, 21 Feb 2018 07:29:50 -0800 (PST) X-Google-Smtp-Source: AH8x224/m6ajtRZ7+EzhxbmwU4WinhQmE535y5zO2ITgHLArMaKHNhnYsUP4b3HPEPa+w/hYbVfw X-Received: by 2002:a17:902:7682:: with SMTP id m2-v6mr3468957pll.185.1519226989951; Wed, 21 Feb 2018 07:29:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519226989; cv=none; d=google.com; s=arc-20160816; b=Lm+K1ZXcMC+QJGGT+KOytXgSa2Ae7SY4P7NWgGKySg7rL98qhwBO9D84W6m6BrpUTW xq4GZCBNNKCswmRT2/cym3kdXda8i5HssoOLFJ2sg0MC9ex8/ryFAobUK1tkXaMjThRL AVVp78sJC7zwFj9bST3Sb+5a/k1clqT/m+vpxRCHYppGHblIVdJYfJXaY91f2outqkNv yaGNj2w6PPu8aXKW2jT7Nnri8UDVxiFWGJJvrfYpTAqBT8o5DE0kw9PwwuO/Iocxd1xl wCnVchiTCg5q8cVcWesHUjDbA4GFCdGdAK3B1Ag2+129lxISA4qXa1p2G6f2p1HciJpv HZxQ== 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=MIkW9DTQm3etLCbfi0N45TzrpKsVBg+3M2BS1Oo+eSk=; b=sC0oaIFnuad7zLXvuwDks+zVd5TrjbOMGiP6TRBAsbwkMwUAB7VFr0apFE2ZbhrH6u SNOycM6wDffC5kZvRapXC0oSLgRwnHaOrp9TeRUlf6axABFahCu+Jkw8U8QXsvz/bqrE cWoW9ZgYDlko8AX9Om5YyTocMF+0ktU5kEaDtlXsI1o6U+tQr6fOY4wh3b8N8yx/79yw HsAl0dWmSJS7cb4CeVz2GHXMjwhPCv9s2lz8SS8dAndlSPYrSgTTsXH5KZflh14clc8m PcwoIiEHfhDb5zovC9Xkb+GGrV4484/BPBbWlZnlb95iR6fSDmABSI6lMKze6mezFVFT iaVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZjWzqWS8; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 t24-v6si5569936plo.340.2018.02.21.07.29.49; Wed, 21 Feb 2018 07:29:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=ZjWzqWS8; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S938296AbeBUP3r (ORCPT + 11 others); Wed, 21 Feb 2018 10:29:47 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:37728 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938292AbeBUP3p (ORCPT ); Wed, 21 Feb 2018 10:29:45 -0500 Received: by mail-wr0-f193.google.com with SMTP id z12so5619254wrg.4 for ; Wed, 21 Feb 2018 07:29:44 -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=MIkW9DTQm3etLCbfi0N45TzrpKsVBg+3M2BS1Oo+eSk=; b=ZjWzqWS8QXCS9TXfEVz99RTwqgnrXlcEXWOG+t0JbR48FF8jG6vd2I7LMwloqvQtk3 Uo9BCUIvHwJWLBCkVDFErBD/Dd39YyKRmircnUTXmN9wxK3/3aWCxn95z90kS8q9TS6L gjC1KkSLBgIUBj3SbmXhdd6/M0UrLu9Eert9c= 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=MIkW9DTQm3etLCbfi0N45TzrpKsVBg+3M2BS1Oo+eSk=; b=Ii+9hEWgveJeKcGnG24uSKFD769mnf0f7vRULQPN0lderql1j7oNfFwLiQyBSB6yqY ZzuPerI/CfA/7TIJmVwE2Wwe8QW8+vZouoDx8QgRnSx1jF3cFcuz2kMeEMk/k6RzkDgQ VCGoxTcVOy8pu8fR6SjV8gi6ELjcW+UfRyp+SiRUn9tqbRpzv2BOY42l9OAIWoGitcsQ WHqkvPu+A7tRZWwzIxy0PZy/Ohm1avVi+9qJ6/JeRmTp2nW4a07llvnrqIdG8ySvqk7z oFv+gXXXXJFwUefNItooenvJYBxfzVqCs6JFP8RnwpWs4BUSU8n1tdoUBZDBbfxy1gIl ZpIw== X-Gm-Message-State: APf1xPDrFL7AU5d4ORPIqva9DaqfZtapxIH0Yt1JMK40yJehrIxWemtS nPmE/lWnMNXphCLMrsWoMEMnrA== X-Received: by 10.223.135.51 with SMTP id a48mr3417062wra.149.1519226983630; Wed, 21 Feb 2018 07:29:43 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:c4f2:763f:443f:f48]) by smtp.gmail.com with ESMTPSA id 32sm26552736wrm.14.2018.02.21.07.29.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Feb 2018 07:29:42 -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, linux-kernel@vger.kernel.org, javi.merino@kernel.org, rui.zhang@intel.com, daniel.thompson@linaro.org, linux-pm@vger.kernel.org, Viresh Kumar Subject: [PATCH V2 3/7] thermal/drivers/cpu_cooling: Remove pointless field Date: Wed, 21 Feb 2018 16:29:24 +0100 Message-Id: <1519226968-19821-4-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519226968-19821-1-git-send-email-daniel.lezcano@linaro.org> References: <1519226968-19821-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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. Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano --- drivers/thermal/cpu_cooling.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index d7528bc..7bdc19f 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);