Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2519809yba; Sun, 28 Apr 2019 02:54:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHDcJ12LmloWzyPoowWocSrk2+d9o5aR+OsUDy9MHAEsVDIAt2+4Knj8x+kHbfjDfMpfyq X-Received: by 2002:a62:1815:: with SMTP id 21mr56852304pfy.107.1556445272157; Sun, 28 Apr 2019 02:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556445272; cv=none; d=google.com; s=arc-20160816; b=e2hZGYyjjWPKsmSRYBqcGfBj9HK/PapxWZ+jRJXCraD4keCVE+6oRZlFUQCtlVUaY3 dwElTVTZPNvqr00UOCX8nNMxp9AObfYM/rpqToULKMKxQ7isvRN66TIOEG5ufmvqHar2 HNohacad1Hf+xcFztugq8lNPoTDdSZHmQta+S1c9Bfja8k7spRzw79b/OCauIFdJLIRo paI+GklFSpOsL+MHIyY1r+CcbmyW5MRZW4VqxaG+i0HTE0ALx0BTAfAxHxbqHdGY4Dy/ nMRJQiT8lLsp3CVpf1EcA+lcjpB+0gPlpv6o8SHkX43ZQPlquhvo8h5UMHiiIdUFSvJp EV3Q== 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; bh=40vQhCWF25KCOygjTxWMwR00SFUppKuwSlIi4NPfG4I=; b=uDJI1HNp6SO0YnJ5NF0F9DCZnkAh8ChRmFjMi2cBNxwUm75LDw2ZWu/ZXpAYdqwVHT XPdPB8AC2aL9AB/vugnn7F2KhnuvjsiXSv3lsSmtBDV68AA0jn8QsQMS98+2sWfP/bXs uV3OlpoRtdXJvs9DM30OZKDJ/31YtS+pzybI6G0x7+TeL/s5QBmsbUg3Nhs7DBxZtXOv P6ZSXREBKbqPHg15yg5bRryvjM2XnyKQ4kgj7R4sCfnfMBtWSbXKSFm2QJQiE3dai60D bVhN4xMOSLFomys6gki3wLvTEfkAWwPDn/ogSAA1fo5Vx7j4BUH/C5xQB3E/hjMWMT/F Hekw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lx+jPmcT; 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 q4si30400267pll.127.2019.04.28.02.54.16; Sun, 28 Apr 2019 02:54:32 -0700 (PDT) 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=Lx+jPmcT; 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 S1726668AbfD1Jvj (ORCPT + 99 others); Sun, 28 Apr 2019 05:51:39 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39277 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726592AbfD1Jvi (ORCPT ); Sun, 28 Apr 2019 05:51:38 -0400 Received: by mail-wr1-f65.google.com with SMTP id a9so11148126wrp.6 for ; Sun, 28 Apr 2019 02:51:37 -0700 (PDT) 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=40vQhCWF25KCOygjTxWMwR00SFUppKuwSlIi4NPfG4I=; b=Lx+jPmcTYGJuK8G7wOr1Hg6U+yhw+gL4mmxquj/CLIDtsag/ZM0B3C1VqTJLYrIYXt 0RK+cDTUhMBkv8aeQipfghWXbKa3fdVw4l3p3NcP3G80kQZKLf63CYq3SfrrfWvRytg9 hqNeUDHK7FLELHlDvhi6iRH3j4t+4ZkM357v+0YTFf29/iocxTgacEXE7fLRrNFw0kMO e4+4j8GMpouzh1itkcOLsqvrT1VniJ3jM/+OD4H4tnZF8gHrwmS+uYKKe+IrsUNU5M0t 05Uv2GcYR+tVjxpM8aBt98XkBFZB8C8BUSBnEb5lLazDfubqcXOAbjaGxF48WJz3WSUV 8gEg== 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=40vQhCWF25KCOygjTxWMwR00SFUppKuwSlIi4NPfG4I=; b=WrLc82u7kxgblA28/uYR27Ha1Pz/6+A4QS0cQqlFuFVjE09FGc67hdhm9uegGUsqEE QEkI+oCR078ZhTclb7IhhD46x9CWxf6jRm+iFqNRx+cMkGHuK+bGd5Nm28jcbyqtPMWG WuXV22WLBNfcdDBTl6L2JekqkmMN+glmRU/o/Z7efILJNGtyvopkWzOtysptVbWXijPR e9WpFtkas9/x3HbI0xv3d5IH6dVcCKis6w3wabeQLYVz70wPXYGS/0ephpfF/k6+zak2 f0LVMFHisccZXcmEzhEljjHRgqG1vQknDKLIsfrtZsgZiyAtsX4Ixx2KaUE4o4aKGbSA 9crg== X-Gm-Message-State: APjAAAXoPC8PSAPVbFYfi9TEqw6npShzjspyOiMzjoR43Sv9eRc0uvrN uaMUG589lWURJ1v9Sdv8cwcEWLrtebw= X-Received: by 2002:a5d:6ac3:: with SMTP id u3mr3683132wrw.13.1556445096437; Sun, 28 Apr 2019 02:51:36 -0700 (PDT) Received: from clegane.local (86.204.129.77.rev.sfr.net. [77.129.204.86]) by smtp.gmail.com with ESMTPSA id e5sm1560675wrh.79.2019.04.28.02.51.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2019 02:51:35 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Viresh Kumar , Amit Daniel Kachhap , Javi Merino Subject: [PATCH - resend 3/3] thermal/drivers/cpu_cooling: Remove pointless field Date: Sun, 28 Apr 2019 11:51:05 +0200 Message-Id: <20190428095106.5171-3-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190428095106.5171-1-daniel.lezcano@linaro.org> References: <20190428095106.5171-1-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 b9d152a5f7ba..9b014d0e8e70 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -87,7 +87,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; @@ -195,8 +194,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; } @@ -679,7 +677,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 */ @@ -797,7 +794,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.17.1