From patchwork Thu Apr 22 11:34:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 425857 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp272262jao; Thu, 22 Apr 2021 04:35:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMYIjP9f01EDnE7any7FKIQv+wuobMEAmwOg/065k/F2UCgrSNUBicp9b+OIaeitj68tII X-Received: by 2002:a17:906:8551:: with SMTP id h17mr2859742ejy.377.1619091312276; Thu, 22 Apr 2021 04:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619091312; cv=none; d=google.com; s=arc-20160816; b=jJ0D2fqYGPYsVkI94skHaUR2kgYGa1OhtUGml2lSdic3zE80tqS3Q16qEad3YhEmJw LjM+VwLUV0FteEuyDrmuvHrQxX+YazUC/QfYkXxu28e52yLbZ0VTmfylBRMWNXcQWKvo bvfuqukFtHZWTcOaP6An7NgUUIaHfOLYOjmYqHmMPvJdZki+d+QOfqJDTSDYNbXJnWWw 6VOL65hb15SaTtqAJpcQ9vPgSaIYNPn19a5H9SMlE6XF8DRGPgZuwr19BN2KKqWhWjWQ 2XuB+gRGx3K0PWgcgnVlnv2F3kCHSDX24bA09Q0SiCqed4ifkUo9+KYNeNjJJHpx+Le+ TehA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nesQIfMK+IRA17P6tXXIkpXFOP6516pK+CAAmZXiyyQ=; b=BeJ6YnCecITYBVp8yx4YTSDTS8ERprT57z+NpVgMdw/hYzw6P2RDPGk0Q9/X79FFw8 AmViCgpeKij6v7M0cVRSa7AIaOmpFai5t5SS5izUM3ULMTTon6xAfvZPdXAwsNsrVq26 7SSvpiM9xLkqMKQT2+Te+9Y1FAhWA96Vuv920VDMOHEFwPFCb2OVvqlZdVrs/EaZLjPy XNe6pH8JtL45kahnuXR0aJcT4lb9c1V4EQClSoBg2JXH1xwyN7I/Dl+SjhvFFeXjTobN KsxqH+1P5HJKk/qOTU37Zw0ihaJXJ8R9MydNTvKCECbIkWDzDkdKrwVYywNnSKG7q/Uw JtcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RhrVbOBr; 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 y6si2229222edl.342.2021.04.22.04.35.11; Thu, 22 Apr 2021 04:35:12 -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=RhrVbOBr; 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 S236070AbhDVLfp (ORCPT + 8 others); Thu, 22 Apr 2021 07:35:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230510AbhDVLfo (ORCPT ); Thu, 22 Apr 2021 07:35:44 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDE77C06174A for ; Thu, 22 Apr 2021 04:35:09 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id c15so35505420wro.13 for ; Thu, 22 Apr 2021 04:35:09 -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:mime-version :content-transfer-encoding; bh=nesQIfMK+IRA17P6tXXIkpXFOP6516pK+CAAmZXiyyQ=; b=RhrVbOBr+ZTTZC+LRLoruKwjZQua0h/acVoW8lowAFUm8W5rEJoG/dfoHoWhb7uDtI AcqAzJyW9K4jtEvSpb3omnXZyrhFCUf0bDScialHScz3A3olefuHdblE81bLIvnyldiz ZLsNSuu1vXzo4Y5VPGI5dLRWEnBhbWU4B40epR0mdVf2/wMmnZBGy5bVqnMw0oaJatxN PF06h6EvcN/FQA7QtA42pX5cYZQLY5OHANW97/uTQs3ssu8td7zj/4Vf/HIrbZyVQ0OW lWazLWPKaLfZaV6hOGlTKpv/hz6vFFqH9wpSXd878rubD0Kbeykkq2uvCtQkVElEF1Ny /ZRA== 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:mime-version :content-transfer-encoding; bh=nesQIfMK+IRA17P6tXXIkpXFOP6516pK+CAAmZXiyyQ=; b=O7k8NAlvZOvdFC8SkIUmyw3xyDC57+6B/xeXkgAXvQ5m2S7b6TCMwqqkIk6itGlLov uii5cNAmxQBbT6Mda0NSu0yN7RrWQQrCp2cgeC6XLzgwzFteqrGxq4qOEwaRJAov9QNb xn8cfI41lhxcI4QKxpgiOQN2pFJQCUCCbaXYAP726IedHYukc+phm4HuFNo7ldNARApQ LjLOls58gqktYsGwPQE8omiLsRK+cJ58igaxzeORmPghTA3kAx9rT90IkerWWBX3IL3x 8A30+iybjmeT6AaMdv9UsuPE7NdHUR9WpYCQcdagQGjiQdSDxKQpfhXRfyZC6ZSeQ1IN UT+A== X-Gm-Message-State: AOAM5302SDaqWTGtbUfzgBFDQpTI6qgZ2X75fVS9CcvrzZ7cohZq8EkH vkC814rJT5pk36bUrTBBOYwdGQ== X-Received: by 2002:adf:f80c:: with SMTP id s12mr3657463wrp.115.1619091308380; Thu, 22 Apr 2021 04:35:08 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:e88d:2580:c20:b786]) by smtp.gmail.com with ESMTPSA id u6sm3237890wml.23.2021.04.22.04.35.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Apr 2021 04:35:07 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org Cc: Zhang Rui , Amit Kucheria , Thierry Reding , Jonathan Hunter , dingsenjie , Bhaskar Chowdhury , linux-pm@vger.kernel.org (open list:THERMAL), linux-tegra@vger.kernel.org (open list:TEGRA ARCHITECTURE SUPPORT), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] thermal/drivers/tegra: Remove a pointless call get_thermal_instance() Date: Thu, 22 Apr 2021 13:34:55 +0200 Message-Id: <20210422113457.51578-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The driver is calling get_thermal_instance() but the lookup can happen directly. Remove the call to get_thermal_instance(). Signed-off-by: Daniel Lezcano --- drivers/thermal/tegra/soctherm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.25.1 diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index 8e303e9d1dc0..355fdf32cbc1 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -621,9 +621,8 @@ static int tegra_thermctl_set_trip_temp(void *data, int trip, int temp) continue; cdev = ts->throt_cfgs[i].cdev; - if (get_thermal_instance(tz, cdev, trip)) - stc = find_throttle_cfg_by_name(ts, cdev->type); - else + stc = find_throttle_cfg_by_name(ts, cdev->type); + if (!stc) continue; return throttrip_program(dev, sg, stc, temp); @@ -806,9 +805,8 @@ static int tegra_soctherm_set_hwtrips(struct device *dev, continue; cdev = ts->throt_cfgs[i].cdev; - if (get_thermal_instance(tz, cdev, trip)) - stc = find_throttle_cfg_by_name(ts, cdev->type); - else + stc = find_throttle_cfg_by_name(ts, cdev->type); + if (!stc) continue; ret = throttrip_program(dev, sg, stc, temperature); From patchwork Thu Apr 22 11:34:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 425858 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp272278jao; Thu, 22 Apr 2021 04:35:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT0haC19GjucYZ1whCvMe8zs1HxVvzHZ9zGrSnaf2zDmfgAAKQLJlIiuHbf1DiEVCNpxj6 X-Received: by 2002:aa7:cdd6:: with SMTP id h22mr3350244edw.10.1619091313919; Thu, 22 Apr 2021 04:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619091313; cv=none; d=google.com; s=arc-20160816; b=ia/cHyceCgfmCurPfHnEIYmUtYwI3xGpSeLb4CLzOjTgVmTj7llIzHG27iFMuqbzM7 DCWMiKalocZYUrWRmIVS3O1Zjaer5BR9qzb5hTaxvhHi6xxly/dHOIGO9Kzd/sOtarcZ MDGJa9cqWRZqZjzCVAVOtU2962fo6htkT7ZuqvQCS0vpjs/PSwWRNJH6VfcJrKBw4FkW KiI1M0aB68jmW5rIH8sRh5kWgxH4fwgzinMrlG3Lcy8FzlASFGO9uY2gxZ/I9jOIxCKq CTLAcu43jqGLq9lqqPd85qgAxuwygCCSvw20yhOPRuoOqMuXLiB3LJZqmMzYWXtrBeAQ 7veQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RvmGnR6fqZoWGO+g5KCcukp75k8kdVWhlFSmREYCODM=; b=BrFx2TjN7r3YtXDf3Dt07YeyXp5upR9+4e3oHbaXvPjYqlJGcfFJYqExm/uFUM9WOt pYr1xxP4K92KKhnJgPA80+EatwMtXOKelkwfF1zvNBce9CbxhKHhqrDsw4IgkzhoFpco /LcQZmXuzYqRrIYiM+5J3vKc3U8mKx25ftKD4SbtxPDwlu/1/yonYKEIQ88CGqAnAJYH XGJMsLvjqus4ByV/8J8jLu3RD1pOnTwmmghk9CIgbMXjsZwjGr2ETEHhVjcjqM3CA0Ne UVUMyb07tVHlu3TM1gKI1ViJmL6VAYLFrg+b5U+tlWypdzYJRGOjYfxUasLWiwI6h96p qtjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="coK/So83"; 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 y6si2229222edl.342.2021.04.22.04.35.13; Thu, 22 Apr 2021 04:35:13 -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="coK/So83"; 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 S236099AbhDVLfr (ORCPT + 8 others); Thu, 22 Apr 2021 07:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236081AbhDVLfq (ORCPT ); Thu, 22 Apr 2021 07:35:46 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB532C06138C for ; Thu, 22 Apr 2021 04:35:11 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id n4-20020a05600c4f84b029013151278decso2920419wmq.4 for ; Thu, 22 Apr 2021 04:35:11 -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 :mime-version:content-transfer-encoding; bh=RvmGnR6fqZoWGO+g5KCcukp75k8kdVWhlFSmREYCODM=; b=coK/So83Z+mSD4tpAr7Z52tFLvTMp4KQbeAuXoQICTLfBRKytKCAl3MUT/jf7RLHkt HlzZ/HLOiaIT9otzb5XeeRAvfOdTYmnDnIzLEMd1KBKj9Dg9TgQKgxxVUsywbO3O0o+i tikPeYBQcT++BYYsMUbgxgw2+SusJ6gWl6J3pV/ZhPYmVdNAwqchPug9k7ZtGwiL6irT FdMOWzlPcyex9V3FKyiJiRSy7gw7DX3ZV8y+2vNz/NW2Tn0BgnmKsvPKAO477ylz561R cyNJp1MGMKnoNBuHph5LeHXJrl5Clk7tHqUXr4E10KAiAYbDdTYpz6nt7yhR12F+ADMf WCgA== 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:mime-version:content-transfer-encoding; bh=RvmGnR6fqZoWGO+g5KCcukp75k8kdVWhlFSmREYCODM=; b=G8RocztLOMuh8JKjW+x1kxYGZn2yH6Bmo64iKqagecRHc5Uy++69pI/WDC3qzy+zoF LPZTLHqNLi34uu0Kb3nBRyvuueVJvlPQknrK7ZdlHZl6RktwOSR5RCOUwvLPjUfviEta +gFWyxYzooY83SHXoKe/C0zqFJoR2/i24xbOfty/rHwUjX8iE/ijdUaTZTFiXUwOkOID iJanJNI6+ASrekY9x0sVIEJCpn2r+UtiMXJuuyYD5e4aWmX/DpS8sA7IsbiicnlppVMc 1N8rydxxMH87vc8e5tHC+PfWkacCYFLdW5dQWZeC0197W4RrhnKqPysOfH9fmi7a0Rn4 OOAQ== X-Gm-Message-State: AOAM533Y/qnx06hM89WFV3zqJwg8dBkwFJR9qc1wUdx59BSsxVLSilhJ JRtcbPDihQvILNjbHqn2hyLKIA== X-Received: by 2002:a1c:7707:: with SMTP id t7mr14745827wmi.76.1619091310528; Thu, 22 Apr 2021 04:35:10 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:e88d:2580:c20:b786]) by smtp.gmail.com with ESMTPSA id u6sm3237890wml.23.2021.04.22.04.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Apr 2021 04:35:09 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org Cc: Jonathan Corbet , Zhang Rui , Amit Kucheria , Viresh Kumar , Thara Gopinath , Flavio Suligoi , linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list), linux-pm@vger.kernel.org (open list:THERMAL) Subject: [PATCH 2/2] thermal/core: Remove unused EXPORT_SYMBOLS Date: Thu, 22 Apr 2021 13:34:56 +0200 Message-Id: <20210422113457.51578-2-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210422113457.51578-1-daniel.lezcano@linaro.org> References: <20210422113457.51578-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The functions exported in the thermal_helpers.c file are only used by the governors and those are not compilable as module. Remove the EXPORT_SYMBOL as no module code needs them. Signed-off-by: Daniel Lezcano --- .../driver-api/thermal/sysfs-api.rst | 28 +------------------ drivers/thermal/thermal_helpers.c | 3 -- 2 files changed, 1 insertion(+), 30 deletions(-) -- 2.25.1 Acked-by: Viresh Kumar diff --git a/Documentation/driver-api/thermal/sysfs-api.rst b/Documentation/driver-api/thermal/sysfs-api.rst index 4b638c14bc16..c35266bbc119 100644 --- a/Documentation/driver-api/thermal/sysfs-api.rst +++ b/Documentation/driver-api/thermal/sysfs-api.rst @@ -711,33 +711,7 @@ method, the sys I/F structure will be built like this:: |---temp1_input: 37000 |---temp1_crit: 100000 -4. Export Symbol APIs -===================== - -4.1. get_tz_trend ------------------ - -This function returns the trend of a thermal zone, i.e the rate of change -of temperature of the thermal zone. Ideally, the thermal sensor drivers -are supposed to implement the callback. If they don't, the thermal -framework calculated the trend by comparing the previous and the current -temperature values. - -4.2. get_thermal_instance -------------------------- - -This function returns the thermal_instance corresponding to a given -{thermal_zone, cooling_device, trip_point} combination. Returns NULL -if such an instance does not exist. - -4.3. thermal_cdev_update ------------------------- - -This function serves as an arbitrator to set the state of a cooling -device. It sets the cooling device to the deepest cooling state if -possible. - -5. thermal_emergency_poweroff +4. thermal_emergency_poweroff ============================= On an event of critical trip temperature crossing. Thermal framework diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c index 7f50f412e02a..0ecf2c66aa76 100644 --- a/drivers/thermal/thermal_helpers.c +++ b/drivers/thermal/thermal_helpers.c @@ -39,7 +39,6 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip) return trend; } -EXPORT_SYMBOL(get_tz_trend); struct thermal_instance * get_thermal_instance(struct thermal_zone_device *tz, @@ -63,7 +62,6 @@ get_thermal_instance(struct thermal_zone_device *tz, return target_instance; } -EXPORT_SYMBOL(get_thermal_instance); /** * thermal_zone_get_temp() - returns the temperature of a thermal zone @@ -221,7 +219,6 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev) trace_cdev_update(cdev, target); dev_dbg(&cdev->device, "set to state %lu\n", target); } -EXPORT_SYMBOL(thermal_cdev_update); /** * thermal_zone_get_slope - return the slope attribute of the thermal zone