From patchwork Thu Apr 5 16:16:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 132863 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp6479722ljb; Thu, 5 Apr 2018 09:18:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx49gqq0ADRsyIA2rh+/PaxxQCOcWoJnNDkPKLqG/Y94M763jN3SXPktCDoPKuHXvBeU7jVS+ X-Received: by 2002:a17:902:6b49:: with SMTP id g9-v6mr23806711plt.75.1522945095237; Thu, 05 Apr 2018 09:18:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522945095; cv=none; d=google.com; s=arc-20160816; b=noXZBe0rjRaG8uud1mhkxr5MnNCOGSKuz8uEI4/Y6AeGXOYlH93ciM1rquK1ihya+u uk6WfPV6JIlHvuWWKsyzYo02YLO6b2k6tsbN+cGOeUvRX4ArL2/vk8IUA3HmjbXcAgIP mJPET2e1IuJoa+mX30fzEk3eujhTwfjM/edpIsJh7WrXzLE46CfC+z/rujlDCxe3Dy+9 s3j3YYUgxGXHxY45RXfaKyTGkGLUPMw2pD+QX92RTVn8LIGlJWdinLUCd6QQh3YlsBzk HWZ6LFGqJ6h94qOoXKWDFaC8TvNKrSn1Rg2fOgclwNQ+7yt19eLUzowrty9NSKpAukJ9 cJbw== 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 s73si6413458pfe.128.2018.04.05.09.18.14; Thu, 05 Apr 2018 09:18:15 -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 S1751562AbeDEQRF (ORCPT + 29 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(-) -- 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);