Received: by 10.223.185.116 with SMTP id b49csp1034912wrg; Wed, 21 Feb 2018 10:57:17 -0800 (PST) X-Google-Smtp-Source: AH8x226G9HKgO2XxoHZiwRbLF6OMD1y4Vy5rna6bA6ujlclzz+hEKbT2wrN05p7CIE2oiufqDRp8 X-Received: by 10.98.34.75 with SMTP id i72mr4176154pfi.165.1519239437654; Wed, 21 Feb 2018 10:57:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519239437; cv=none; d=google.com; s=arc-20160816; b=XJFh1cLrPJ2OixXEGwvVqGugYiNP2rkFKQVTRYRx589K96liOs+LnNhNBe7DIXV2TL k+KPqUFvK3CgR6tcHpQOInA16wYLEIZB9jhOs9p7I/jrmcg+x0i8xC169oxVUgNnw/X6 Y8bFsoQ6GuXGtsSNMWosZynulE2Pv+JLNJ7LeTGJj0RonuyJ91Nhko/eNUbZU6/o7dqC 6kpSe6ZBKHmpMtsBtoaMU7UDCHodex3MZXNPr4U4a8TQMG4U6OHlwzOcLp/MpLOLjdIK 3ZddizwAlNMMkFCofnr2gmeuw89BvX4/8RjNbg+MQRj23YTjwrXokEZZ4BfXNBb8bhkE nFiQ== 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=ADs3upK4x+4XKaR0v8J7tvePzZUqjHOhIi1TM+QfSk/m3Pj1+IDQHDAgwMwrRMQtfM oeQ7WGtMfH4iW4aDggAZLwpP8+Eiglcnr94AACDh2oD1RGjhwaiKhB1nhI9e0PG9lVc8 dNyPCpXMxWSkkleSov7a61PVWUHULlZJmAp5URG/YUlEWRIHa0Og8CPm2aSplAasmYRr Fb/sJMrSStV79DiLxAuYSa+K2Jw44wErp7kO+kjgNhBoulgFpvmTQyw5qEV1Flyh43yP jHvQqA0cGRoD157xVBd6/k9rS0B7YGuXj2ihRZcZRb+D/SQyayJGbj5yTwyFEuxVyU7Y uhNw== 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-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 b5-v6si4618782plr.335.2018.02.21.10.57.03; Wed, 21 Feb 2018 10:57:17 -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=ZjWzqWS8; 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 S938305AbeBUP3s (ORCPT + 99 others); Wed, 21 Feb 2018 10:29:48 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:38556 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938291AbeBUP3p (ORCPT ); Wed, 21 Feb 2018 10:29:45 -0500 Received: by mail-wr0-f195.google.com with SMTP id n7so5623404wrn.5 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=czFEuRH8AZDhjCD6J8up9GLUxfh9Lkuepz46zqsMORnMHH+uSroROp87WyJBsX4aaB +aYgp0QyHFSpR6JkaprkEIX3hEsBABmPuUbi2fycvLSUkzYfipxIPbCMLtaHE9dl/pO+ m6MUaobST3SeBijfEcSa1LTLNSS84//14PttQYF+nSEzKSKjfOzHbZqbUewxwHQb40sv zVfO/DB1VRTHLJDv275oxwHQ9zb9k8S6VyDDqJCAmevCvlEU6He1cEQrCywQAqD0R+vY 04CB1+QcKVDNGxT+yhf7+8jStdg7HfUNcNT1oevNw6t+fUJonvD0Za/BjFNDG1xJCVL1 UuJQ== X-Gm-Message-State: APf1xPBbwJE0t5WSYU6ckstr/g2p0OqOVDaMcZSvyBbyC1WA0wHgspH1 bj7wcJ3bK5ps9PhM8+4+CmRJv6tYcaI= 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-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. Acked-by: Viresh Kumar 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 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); -- 2.7.4