From patchwork Sun Mar 14 11:13:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 400089 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2613075jai; Sun, 14 Mar 2021 04:14:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYCS8F5rVLx6wn18s9FOa3QlN35rqlA2ooWfvumkvK753NDigdWG3ygNfwm+XHvasHWLWJ X-Received: by 2002:a17:906:938f:: with SMTP id l15mr18068163ejx.15.1615720489761; Sun, 14 Mar 2021 04:14:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615720489; cv=none; d=google.com; s=arc-20160816; b=sefpPPTCkg6vwVHgAWMNRKxEOWVBSbrPiSnA6zCq9pHuMj8PQoWH8xQvoS4J3ajgsh 9QCHEFNg2Ct35SQADx1NVRrQ7xfeWUHZUjSixxOQllCtmBAIdfWQuYngJW+vk0cSJIIT 8B95rkL0AORS8TFoW7tJ/OAhWWoH2pYNbO9L2FvMYSHbJkcNerihJJV6oXHdKe5ZsgYS zXnLMCzBRI4WvkWpjM6IPrVStfKdACy8++jagUfQCzO1I8MBdMqAfazRpC4JOlE67OaK gC86vuPK0eT0ygWj6XZ4u0qisynFS/i1p5WVINv/pjeFUOkvxg4PFloWgPjgMwWO9O2E yx2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=AIW5JdRiazsxMw3x5g28vgK5yNC5+8RelKPzLiP5l5I=; b=z1JHwUZkcG/QoGLLhfY+geVk3JcrQzAxXicIxo3W/BOwKxYRrMBpNADr1pcfq7b/KN hTNPhpErI+ImdZwoMyaxpNJk/jVErfNOPWu4QwPOaKPTDx251Y7obdT9erwm03e7OkeS 7wbYWlj+Eez0I06xrieIHzv324qhcpl9mFjwuStivfArxilvnORExvaIVBdDIv6qlLhh m5dqHtthMy7NPtoHzoDpw648mVhh20vJ1jpScOaCoL5hPJ3wooC7pOyKFAWABEe6+egb k+j+gTfU+s7A4B2I+Q5ith4BFNraQGsRSzvvqnRa1gM7tnwBgFFGrG3uc92chq2Pzzof kHUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bTzF53Dw; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id z22si8231744edc.427.2021.03.14.04.14.49; Sun, 14 Mar 2021 04:14:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bTzF53Dw; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 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 S235230AbhCNLOQ (ORCPT + 7 others); Sun, 14 Mar 2021 07:14:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235231AbhCNLOM (ORCPT ); Sun, 14 Mar 2021 07:14:12 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B01FC061763 for ; Sun, 14 Mar 2021 04:14:01 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 12so1360108wmf.5 for ; Sun, 14 Mar 2021 04:14:01 -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=AIW5JdRiazsxMw3x5g28vgK5yNC5+8RelKPzLiP5l5I=; b=bTzF53DwJpsYl5uU/6LFHN9EfBLcWe7eeiehJ9VJxk9fAR6L6CjVSsViyPDfxbBc6y Bmy6cU2dv2N0/J61rN8xXi1j6TKQ139RqC2+3vMvFwdsbNqYt1ij1RLsBOffB1Sk8j+g g0B85O2p6njVG2H5bIurwnGP3E+pxIgrP/voa4vzGXRO+wyOmThd27N0o0cHQ1SArR0T Yx7PV7RQ3U75mrzEpfHhzGJMRkIshJSJulHT1bVq48LrUc/R1Dc8HuEmSQMR0aCXXN40 9g53FRYLQJncIYke7+fQu+fxkYZI4S94fbbSQA2PG8RYS4Gld2pX/3ibRckUZ2NzYr/L pUcA== 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=AIW5JdRiazsxMw3x5g28vgK5yNC5+8RelKPzLiP5l5I=; b=uDnXKNx/SrvvFS+ILAltuqmUrFLzhRIjTYmFFub4Csi1x7Lv6kbv53W/6NM/PHpQS1 702hSqCrop0w2X+QXFSt3SkvOe9GCOoNj51oy+BRtdkAJHEc0Y4JUR8k7gZ1l9VtBLZs +QuWsk13dVIqB2PitRa8vevGzFpqrUEnYuN/7toJEQ9lwkQw2eitsbB/iP5XWR0Fxhmx wxj5MK6bSSRbGep1pUaNmX5NhN/QLtZQsX27+ulVyX62y1QrZAasKGv2RPwXM6JVWdJ1 XdqUxAvgF7dPnqgYz9c4RrvtxuubiRNtGu6N/s2WsIsf1PlgbPs8E8YCAn+dH+TyUPIE c84w== X-Gm-Message-State: AOAM532YB6Soh4M2IVddi3kV+YHEgU/JUIJOZkqfzzsf6J2nIQhq1AsW cmSZYJnckJ7v8yl2SXCG/VFwjQ== X-Received: by 2002:a7b:c407:: with SMTP id k7mr21829856wmi.136.1615720439841; Sun, 14 Mar 2021 04:13:59 -0700 (PDT) Received: from localhost.localdomain ([82.142.0.212]) by smtp.gmail.com with ESMTPSA id i8sm16828330wry.90.2021.03.14.04.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 04:13:59 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rui.zhang@intel.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, lukasz.luba@arm.com, Amit Daniel Kachhap , Viresh Kumar , Javi Merino , Amit Kucheria Subject: [PATCH v3 5/5] thermal/drivers/cpufreq_cooling: Remove unused list Date: Sun, 14 Mar 2021 12:13:33 +0100 Message-Id: <20210314111333.16551-5-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210314111333.16551-1-daniel.lezcano@linaro.org> References: <20210314111333.16551-1-daniel.lezcano@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org There is a list with the purpose of grouping the cpufreq cooling device together as described in the comments but actually it is unused, the code evolved since 2012 and the list was no longer needed. Delete the remaining unused list related code. Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba --- drivers/thermal/cpufreq_cooling.c | 13 ------------- 1 file changed, 13 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c index 3f5f1dce1320..f3d308427665 100644 --- a/drivers/thermal/cpufreq_cooling.c +++ b/drivers/thermal/cpufreq_cooling.c @@ -59,7 +59,6 @@ struct time_in_idle { * @cdev: thermal_cooling_device pointer to keep track of the * registered cooling device. * @policy: cpufreq policy. - * @node: list_head to link all cpufreq_cooling_device together. * @idle_time: idle time stats * @qos_req: PM QoS contraint to apply * @@ -72,16 +71,12 @@ struct cpufreq_cooling_device { unsigned int max_level; struct em_perf_domain *em; struct cpufreq_policy *policy; - struct list_head node; #ifndef CONFIG_SMP struct time_in_idle *idle_time; #endif struct freq_qos_request qos_req; }; -static DEFINE_MUTEX(cooling_list_lock); -static LIST_HEAD(cpufreq_cdev_list); - #ifdef CONFIG_THERMAL_GOV_POWER_ALLOCATOR /** * get_level: Find the level for a particular frequency @@ -602,10 +597,6 @@ __cpufreq_cooling_register(struct device_node *np, if (IS_ERR(cdev)) goto remove_qos_req; - mutex_lock(&cooling_list_lock); - list_add(&cpufreq_cdev->node, &cpufreq_cdev_list); - mutex_unlock(&cooling_list_lock); - return cdev; remove_qos_req: @@ -697,10 +688,6 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) cpufreq_cdev = cdev->devdata; - mutex_lock(&cooling_list_lock); - list_del(&cpufreq_cdev->node); - mutex_unlock(&cooling_list_lock); - thermal_cooling_device_unregister(cdev); freq_qos_remove_request(&cpufreq_cdev->qos_req); free_idle_time(cpufreq_cdev);