Received: by 10.213.65.68 with SMTP id h4csp2121520imn; Thu, 5 Apr 2018 09:18:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/eVyMtlKetLTjtF3hDmeOvlCTOSGOc1iioBRQoN+qNx19XJq6UaUynRBUS8CVSQJGeEoI0 X-Received: by 10.98.80.5 with SMTP id e5mr17664313pfb.131.1522945120591; Thu, 05 Apr 2018 09:18:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522945120; cv=none; d=google.com; s=arc-20160816; b=RKKr+k9sS+BP7lskhRNbdZv1E+uGz3J7an+3cbX4adDrjHddPs7yq7pr+U+2wVFsGK 75Ae8NuIpVoZ1LhscDT0onlid5sz2uq32LLMbTLAia0tq1yppaXKVSHiKUOVAhhmBcGM yU+jC3CvdMbJNiLD7VuMh0tyuLN7DlORl+T4Y+9M5vTEEBWoAySmhW+zBq2fLJ1Ys4Fk x3KFrY9oBGnaC6TA2IAm17P6VDptM1UqN9zrEC5RFk+xk7CP/Su3rAIZ9JwXg4V/dSrh ZEQpv2c6YqHs9jEK1qlg4+L/x0i2fg7cax3sHcNH1BdLpIvnhSq5FdRwe+1058p3egbe IWgw== 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=OUjS+aasQBK/AOpL8/MGvIRbtQeDH+KEl2bhtfacP7sR42+8v7mUsa/8+G8u7dphSa VfbFC+z5ZDnvp1e/1kMHc0l9QlzbiLQALp7fJ8buu+XlIhB+ToMd7jv3kovNiftiI0kt ej0zGAS4LegD0QY9sHNtrGsNwEnD0WvFPESPLltiGJlS3iN927H9FKRjb2+f41ybpCey 6r1fzGNWTVen/el97DlSOXEkVDgEFOys0SarAVYCQeStHDxWoJB8dm34g60XcGCaixz/ Kxa0llGNuZLcrTOuaoqeZDYxnQQCbg2UOu/m9r6YDK88yxA7hZwadC8GdwlTAT/DUCd7 be2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YLL78Xm6; 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 99-v6si6132766plc.601.2018.04.05.09.18.26; Thu, 05 Apr 2018 09:18:40 -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=YLL78Xm6; 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 S1751544AbeDEQRF (ORCPT + 99 others); Thu, 5 Apr 2018 12:17:05 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:55907 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751367AbeDEQRB (ORCPT ); Thu, 5 Apr 2018 12:17:01 -0400 Received: by mail-wm0-f67.google.com with SMTP id b127so7230974wmf.5 for ; Thu, 05 Apr 2018 09:17:00 -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=MIkW9DTQm3etLCbfi0N45TzrpKsVBg+3M2BS1Oo+eSk=; b=YLL78Xm6UWAYZzY4BzjA5T7pSpr7r3lDDNpilJK33pc0cgW3Bzfii34s9JSYyx6Io1 8uo41Wiih88g1s3VfSmyh8zPGyA1tVOHGnFbHIAP8fUWksEy2l0SEyKv0iJf82YgORog mCKKMkwqJmq1/O8FDWyS4JlC5etnV6UkSn1ug= 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=h8dpDCTQvv6MfAUkJMvFgS4AOnkyb+ol7/yE2NgHrwVNnRoXiahPKBRazyWDEbM4y6 HmMQZpl5Q5eeT0XHLiDxRYVqpSnLkG9U4egU3PnUp5EBdzNdic76cWoEWTH7k3MOoyrE 0uXOVn126uckPbASo3YxUc2caHJxLgcCpQQ0N3nRPyAjHB9NcPi2HIk9Owv+/MBpR4+B 43Iz9m843TG8ZP+v0BMbLArw5yttX7nZv/mibrMdvNLvfG+OZX8SBgJCRLDkdBWDDDBq gyvZ2shvV8l7BVdrBNaODCWxnmPwb6Rgb2fpWfhiH+Zxful83tFFtpasA9FXPkEPw9J2 O/mQ== X-Gm-Message-State: AElRT7E1GbcV1KKHgS+0b5fCf6TzeUIDi2mHxhJkhMDEKMao3fEWqQ/r qcfk8MNkbxvfn5wWqaeDdKhKBmBE7ng= X-Received: by 10.28.125.194 with SMTP id y185mr12821269wmc.160.1522945019895; Thu, 05 Apr 2018 09:16:59 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:d9b6:ce30:b76c:2e56]) by smtp.gmail.com with ESMTPSA id 39sm16103904wry.89.2018.04.05.09.16.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Apr 2018 09:16:59 -0700 (PDT) From: Daniel Lezcano To: viresh.kumar@linaro.org, edubezval@gmail.com Cc: kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, javi.merino@kernel.org, rui.zhang@intel.com, daniel.thompson@linaro.org, linux-pm@vger.kernel.org, Amit Daniel Kachhap Subject: [PATCH v3 3/7] thermal/drivers/cpu_cooling: Remove pointless field Date: Thu, 5 Apr 2018 18:16:40 +0200 Message-Id: <1522945005-7165-4-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522945005-7165-1-git-send-email-daniel.lezcano@linaro.org> References: <1522945005-7165-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