From patchwork Sat Oct 12 06:52:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176043 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777693ill; Fri, 11 Oct 2019 23:53:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiaClzZhSYdXQeCYrmxGxUUe17hcDPwDdAVCvGL/fZTLFb+WZIvqdQayFJq5UK+c6AL6M/ X-Received: by 2002:a50:a781:: with SMTP id i1mr17413636edc.17.1570863186244; Fri, 11 Oct 2019 23:53:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863186; cv=none; d=google.com; s=arc-20160816; b=KEVHLFkwOZq9N90aM8PksYFzBBp98XVdAtYh6qAyJuHLKBdrbOn8UjnrfnR4pUEyBs ewp49dnjmOpLS1OA6XMpa7UX6C3/RwRrV+FS6km6UCVjYfkG9NTwDfK3zwu3tn0sl/Q1 Bj9XrGBBK5YGJxoPTKPbDaO60dOL92SIBgY2VjdKfqQU3Zq1PWXjByhvSLKRhRx2cdWd mOalkTTWqrI63KAOsHoaLBmCi8DXgt/JUrVAfIYXuW7++kRNKVy0v/3tdiOtAv//Pl0S GvxB2WviSq659pXXEn7VBeenBaOzZt/3kViw1gcYlvWGJw0oeyPsd4JnXNL2856h1Qg1 Di+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=fQ6eXPgRmlE7QGLNLnLPlmdGjpBQkjzBBl5+6F7Plow=; b=YWL2/YFmz0ti5BlQUjCoK7f2v+czf4+7FIfwH6G/PPZIWaduPMskq8N9I67bkciuMx EWtFO315UXvXG9SSX9BFVoi5gSk1mKvL+6CGaqKhvHof+kvEhqEqqJh52w+T4rQG7zAM vdzRegtRBnwzs37y4T8blOZVKxVJBjp+H2VYlSNSAbYGA8czyn8/oBDVBDl1vftLRoOI bnio6JzoYMyg0L87eG5eZRE4wn3DPDejePDyC1xCOwY9MQphH2De9L5+PCdq3URA9MB9 U8tqte5zK5zXf4fDzhdp6fRD2yf1+baaBypZBTVomQ5JiHPsOWyz1TDOxq23hHrcZ1JP d2/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jU5Rkt5C; 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 j47si7072773ede.117.2019.10.11.23.53.05; Fri, 11 Oct 2019 23:53:06 -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=jU5Rkt5C; 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 S1728801AbfJLGxF (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:05 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42624 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbfJLGxE (ORCPT ); Sat, 12 Oct 2019 02:53:04 -0400 Received: by mail-wr1-f65.google.com with SMTP id n14so14052098wrw.9 for ; Fri, 11 Oct 2019 23:53:03 -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; bh=fQ6eXPgRmlE7QGLNLnLPlmdGjpBQkjzBBl5+6F7Plow=; b=jU5Rkt5CwB2Du/Izd0rvUMrNTYl9HEaywmBiUBUFvNDZQsYZ/Cndo7r4wzeHZeIDLD oqwHjIA5jt/MArvAd9DQ4RRs8BQoswRY8SZdq/LloTX46frlz4BHmM2fXhqhkgQ+Py87 gqQ1ZwJjNg0igFl/2fYpefAMB+v/1rG6x9gSxSlRjVOmqzKQ6grihz/vAgqApwBjkZJE a4l9E5EMIPdnZDOch1UDcDA42xBfHYQiBdhEdY/YYncYhRTfzRq3/KXlmyRr5wJ17hBV HrPfjfBOt8X3dFvItCzme5S2m+rJ6gCGkLG+iPTvsCqJe31onu/m4L++r/AG98qiPToc Fv8g== 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; bh=fQ6eXPgRmlE7QGLNLnLPlmdGjpBQkjzBBl5+6F7Plow=; b=kq66XDMS1osCow6WMsLSJW19srN6RZOk2ooepcriZ+hi5kL+0jx2t2sQmeAiGP/HT5 aBOcc8ZteMyQysGwRUU0Dmobs6Lc0SaU6jR7oeW2uNhGmpwr5W5X6jnrGMtiFgmWYe14 na5zJW5ADzonUOV0OfcCvtJsvmi+nADm8alwFsN9si0ZKSQE6nq3+qms6rYN6tlrRH5j 4KMeczpOXdiEfxh/sDbb/U7YBNNutOJe0xIP+47pSwxewI5HcggMBDahPxSAg5fDoCSr 5q6TQ/Dx7RZcHYWvzPYBJQiUr0zDyymVyFf9Qc2SZpGFYEiZcPMY8xZG9IyARejHv73O aLOw== X-Gm-Message-State: APjAAAU+QZeTMgrajBjBdiPHXw6SKQphvLoof8rBf7rYkmZZeo8w9/3P 1NpEi+o8Ok3ttZFySvxLvpeM2A== X-Received: by 2002:a5d:6b03:: with SMTP id v3mr16898131wrw.182.1570863182430; Fri, 11 Oct 2019 23:53:02 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:01 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 01/11] thermal: Move default governor config option to the internal header Date: Sat, 12 Oct 2019 08:52:45 +0200 Message-Id: <20191012065255.23249-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The default governor set at compilation time is a thermal internal business, no need to export to the global thermal header. Move the config options to the internal header. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 11 +++++++++++ include/linux/thermal.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 207b0cda70da..f1206d67047f 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -12,6 +12,17 @@ #include #include +/* Default Thermal Governor */ +#if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE) +#define DEFAULT_THERMAL_GOVERNOR "step_wise" +#elif defined(CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE) +#define DEFAULT_THERMAL_GOVERNOR "fair_share" +#elif defined(CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE) +#define DEFAULT_THERMAL_GOVERNOR "user_space" +#elif defined(CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR) +#define DEFAULT_THERMAL_GOVERNOR "power_allocator" +#endif + /* Initial state of a cooling device during binding */ #define THERMAL_NO_TARGET -1UL diff --git a/include/linux/thermal.h b/include/linux/thermal.h index e45659c75920..a389d4621814 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -43,17 +43,6 @@ #define MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, off) (((t) / 100) + (off)) #define MILLICELSIUS_TO_DECI_KELVIN(t) MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, 2732) -/* Default Thermal Governor */ -#if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE) -#define DEFAULT_THERMAL_GOVERNOR "step_wise" -#elif defined(CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE) -#define DEFAULT_THERMAL_GOVERNOR "fair_share" -#elif defined(CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE) -#define DEFAULT_THERMAL_GOVERNOR "user_space" -#elif defined(CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR) -#define DEFAULT_THERMAL_GOVERNOR "power_allocator" -#endif - struct thermal_zone_device; struct thermal_cooling_device; struct thermal_instance; From patchwork Sat Oct 12 06:52:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176044 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777741ill; Fri, 11 Oct 2019 23:53:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRfIuq4I0P+8YtKNlBI3u5AiDx/MYtqO5LnGHSRw5astKWRcSGuhC/ezc23DvLiJu+bW8l X-Received: by 2002:a05:6402:1548:: with SMTP id p8mr17363815edx.43.1570863190948; Fri, 11 Oct 2019 23:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863190; cv=none; d=google.com; s=arc-20160816; b=w3+A0sLvZF8de/4fkFAbSkM4+9BXccyT4eKGJbf3MTgoNk+6bIlbuv/Lfm4+L2FOfm gV0lHnaoe6sbMH8VyZAhwy/pIIY0oYazTLKHuC/IPdyrNuRaJsVmcuqiUm0LZE9A/eGk CkwI74P4iS3IruscVXlmTK37qDT7UhxJNtRoh9Nwk05BBRUKB+NLhlCbsN6NASq6qSHC VM0kDFCG0x/s2mtfIWerWPzMZW8NkRSizpkPJIQcIsO6icp12sWrWCCQAELpPdnMSKqh S43cuWgT+ansywYAqKyYCBkcIqwQdrz1HWzy/g9WSGV7E1cztMYrgR/GWxBDzfXn54Dr L8GA== 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=Qqj/nrtgrj7T526mRixYvVR9P1e7BOzGZBrRGmLHoMg=; b=fbRD9TDPFT3OL3anhChfTtblzgOVkZ7ZBxXWpUIRlo5GTc1fzfhpcYMcfsMVZHyhSL BQW0Ckque34d0zAaZbbNcy4g5YFaWaTzE+2Mh8akm8od5F67jdU0p1Uoumq/g7vz/Jsb nel4nFxBL3TkaXkS/eDBvMLJw7VUnu5cGhJrrL4gVgPkrECO4OzTCdGIimwrHOXe/aFA AhhxvtewPZSGV3nAbCs1Vvs++wtHQnrRHBUtkAe87vvUOO7NMmtxhHtUMljNVR7D9bHx 4uyS3UcDRmADAXvX5BK3DB0w6kFwpoE3vsOwAT06sbJi/ZUynzGka3VK9CLF6kcAFo7O qzOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VDORRgs7; 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 j6si6603684ejj.37.2019.10.11.23.53.10; Fri, 11 Oct 2019 23:53:10 -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=VDORRgs7; 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 S1729015AbfJLGxH (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:07 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33298 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728842AbfJLGxG (ORCPT ); Sat, 12 Oct 2019 02:53:06 -0400 Received: by mail-wr1-f66.google.com with SMTP id b9so14118812wrs.0 for ; Fri, 11 Oct 2019 23:53:04 -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=Qqj/nrtgrj7T526mRixYvVR9P1e7BOzGZBrRGmLHoMg=; b=VDORRgs7HVWsN7gF9w1rwI9oadtUhPDEXK5jDTa6w26m94qeaobDZVn3JcRsxxXacV goVv2ihF8bSRKgTOIg4XudDbWMyyFFngulBpWD7SO0ldxIV/9ACtiuBWJqYRZX4cjg82 u3ad4jjLCVohlMz4KnAEATIZWI0spGkZcuWV6ZDLWThEkmgV/DOxP4okzE1ZfO+xvXyu q4VFSfR2WkodxKFoQjeUmVUpW2SoXCVqMWzXCzo64JNKjIPgwBGXReXkNCfpTyTy1GI9 d4m31zDs/G36G6uWGG+biaFkM0VuiVdHlT1ehNfaJ0oJPKa2W7OT8BCHkYt4oIR/M/ZO HXbw== 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=Qqj/nrtgrj7T526mRixYvVR9P1e7BOzGZBrRGmLHoMg=; b=pqns2Qa+iIKXA8qigCkainX+xXjYp3yLWOFvFNPvgXL+nyvTw7oOEe6ZY7pAABJuRE sEdxRrc8kVqpxPjbQNvG63/J/4QYm1Viu5CNb4S3Z32iAPAqQ08bdoPicuxijBRGFx5V N/zCn3pcyoAHF5sWm18i9YkMrTfnCc30zW/0qNxCcyeJNSP1pZ4nMC+vOMdb1YhfgPjB cDDf2GlHsfAQGyWzncDs67LLyUasS0uKjR65kA/g70wmpxQ1fNe77lVX3mo9xp5cBiMi ZMJ+XywryS2dS8CiolJFsFgAt0YE1/C4Yhh4LSwE/FUxXl+i/zIBteUi5Iy52VEZicUp 5WwQ== X-Gm-Message-State: APjAAAXdf9+xGXhTf382Nxi2EtueyxaEc8K0k2itkey9l4giF20hdvNH YjtSyDQnShrJEDkebbfofocTfw== X-Received: by 2002:adf:f192:: with SMTP id h18mr15691694wro.252.1570863183415; Fri, 11 Oct 2019 23:53:03 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:02 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 02/11] thermal: Move struct thermal_attr to the private header Date: Sat, 12 Oct 2019 08:52:46 +0200 Message-Id: <20191012065255.23249-2-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-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 belongs to the thermal core internals but it is exported in the include/linux/thermal.h For better self-encapsulation and less impact for the compilation if a change is made on it. Move the structure in the thermal core internal header file. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 5 +++++ include/linux/thermal.h | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index f1206d67047f..0e964240524d 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -41,6 +41,11 @@ extern struct thermal_governor *__governor_thermal_table_end[]; __governor < __governor_thermal_table_end; \ __governor++) +struct thermal_attr { + struct device_attribute attr; + char name[THERMAL_NAME_LENGTH]; +}; + /* * This structure is used to describe the behavior of * a certain cooling device on a certain trip point diff --git a/include/linux/thermal.h b/include/linux/thermal.h index a389d4621814..603766a4068c 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -46,6 +46,7 @@ struct thermal_zone_device; struct thermal_cooling_device; struct thermal_instance; +struct thermal_attr; enum thermal_device_mode { THERMAL_DEVICE_DISABLED = 0, @@ -130,11 +131,6 @@ struct thermal_cooling_device { struct list_head node; }; -struct thermal_attr { - struct device_attribute attr; - char name[THERMAL_NAME_LENGTH]; -}; - /** * struct thermal_zone_device - structure for a thermal zone * @id: unique id number for each thermal zone From patchwork Sat Oct 12 06:52:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176045 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777752ill; Fri, 11 Oct 2019 23:53:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJTTUyq9CnEEEP3KxYgL8Q4fvYkMcMw9tGgfwZLQv6ZspoLu29dlD4kkswDbPjEGhS6LXQ X-Received: by 2002:a50:d54c:: with SMTP id f12mr17315416edj.116.1570863191612; Fri, 11 Oct 2019 23:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863191; cv=none; d=google.com; s=arc-20160816; b=TR9T+mR78KB8t6VwnTdedcoOjGuLI+i4iZeLjJIEfnThj8y4XJFraCZyfPU5rP1OU/ b9u/uMyctEK3se2KIqVe8NdJ4qR7A4VVL+u2WMl2q9RxBp6BZUc0VE/Gjt75OqY3maJa 9AP4VEylTzJaO+uWe7qOVrbreE5FHjz891kCVqNeMZWzFh/366BAQGqDRW64iLjf5O6t q4+WPTTf26FSZ2spZUdxb0BGFJQMicaZvj/7AzRxVIX84NWykpdjZL7oMIexLwQmF0cA moWOcHx8BxvvxMtr1u7TDpRk6lde45V1Snv/SjrKiMIODvcRo5ji1PDkw0RI5b0zI7cj 520w== 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=xHcBgOBhQx/DWwTnVmG8K83D5aGb+y1z51DF9NhXCic=; b=sDhkoohG7EFyIWQ6+rsz6grRNS7b0JCKXUyZgmzB0ZnIGzjQWqLe6RhnU9SaoD4kHX DZ1gchEK19U1dqh/HxqtbBEYsqxb8R706VtvVXHkdrO3vJ9n2OkbtJFVK3TeSaoZIByI QqdEZFBhqrIqXPjwqa0/OK3CaJP/yK7hpirqBY+P5hgPlRNaQVHpDMuJinVymOCB1KMO vsHayCP3p5pmuD7NtxH8XxZylcBG6IFmhsy6lii5sZ5kzXDcydWGj0PI5zxue/Beqn6s v7LcPm0CNOpFBF9bbR/jX/X7zoaUqIuyifBG9y6qvGP/4Ww3zAYrESmYNiHzXzg5k0Wt UV0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QparcBdv; 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 j6si6603684ejj.37.2019.10.11.23.53.11; Fri, 11 Oct 2019 23:53:11 -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=QparcBdv; 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 S1729030AbfJLGxL (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:11 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40180 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbfJLGxG (ORCPT ); Sat, 12 Oct 2019 02:53:06 -0400 Received: by mail-wr1-f67.google.com with SMTP id h4so14106721wrv.7 for ; Fri, 11 Oct 2019 23:53:05 -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=xHcBgOBhQx/DWwTnVmG8K83D5aGb+y1z51DF9NhXCic=; b=QparcBdvemceLiXGxQgjeJMqaa9Oth/jqWHcOmQII4NvA2oggRO+4FzltfmSn79PEv LdWXtzXkGj5Ub8z7VsT4oNBDVxez0jBNBjbNgUmGE8Vf1kv+wHJzcFHiTkr6EZDHajO1 Y3EU/VFmWfDEepS/72qNQcTgdlp5ke/dTEzctNo+WK1Ts4qZxr2IJXKlwrg6RQnXm46o HBkU2qFhN7eBhUzyYTKF9mN9UmPMbYVSldB1+21jNh3JRnlPrnJ8y3ZNZQpjJsEp4QHV HbdDQP/0vuSY8uyDKFn2tMV2A29yQHMsd5aQRUrtoLbU7q2MQjOw2I/VCUlaLg4bag+b GSiQ== 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=xHcBgOBhQx/DWwTnVmG8K83D5aGb+y1z51DF9NhXCic=; b=gwfFYRCRbDBbwdeg1DeEgIkz87Jd6+nQJ/tZserZ25cIQGBo7yP8bEN2dOfwLo6P2J 2BSgrKz4SJHZx910ksenT/YRIvo+5YyDmWjAIVdK/ydZyQ6JMiVIDPQSo0kCoBy6WI6q W65bdswZo1XZZCYJv1of9z0ibxdpuSATme7D8RsoUVHUG8r2n9uHPz0lg6jUMTkYdtwM A+zXFqsoFzjBvqvZVEFHNY5UUSw4E231YM5uQ0GVes8S/ouBRjhFqlQcJn/yMN5FWzy4 cjBMPcREaeODyMdmyIsz/3QQ7g3pT9bfc4BkZczpEvbJgAtYV4L7ZkmVXMI1zPi/OMLh +hcA== X-Gm-Message-State: APjAAAU86CZJiW70VAIvkbHcLvvQ/Wx5Zc6SBJs26vpKEyx2gMAwusEL DvtB9RDm/gCdiq8sc08Zr1iQFuAm+zk= X-Received: by 2002:a5d:614c:: with SMTP id y12mr17350876wrt.235.1570863184509; Fri, 11 Oct 2019 23:53:04 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:03 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 03/11] thermal: Move internal IPA functions Date: Sat, 12 Oct 2019 08:52:47 +0200 Message-Id: <20191012065255.23249-3-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-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 exported IPA functions are used by the IPA. It is pointless to declare the functions in the thermal.h file. For better self-encapsulation and less impact for the compilation if a change is made on it. Move the code in the thermal core internal header file. As the users depends on THERMAL then it is pointless to have the stub, remove them. Take also the opportunity to fix checkpatch warnings/errors when moving the code around. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 13 +++++++++++++ include/linux/thermal.h | 24 ------------------------ 2 files changed, 13 insertions(+), 24 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 0e964240524d..5953bb527ec2 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -46,6 +46,19 @@ struct thermal_attr { char name[THERMAL_NAME_LENGTH]; }; +static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) +{ + return cdev->ops->get_requested_power && cdev->ops->state2power && + cdev->ops->power2state; +} + +int power_actor_get_max_power(struct thermal_cooling_device *cdev, + struct thermal_zone_device *tz, u32 *max_power); +int power_actor_get_min_power(struct thermal_cooling_device *cdev, + struct thermal_zone_device *tz, u32 *min_power); +int power_actor_set_power(struct thermal_cooling_device *cdev, + struct thermal_instance *ti, u32 power); + /* * This structure is used to describe the behavior of * a certain cooling device on a certain trip point diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 603766a4068c..fae9ff2b079a 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -400,18 +400,6 @@ void devm_thermal_zone_of_sensor_unregister(struct device *dev, #endif #if IS_ENABLED(CONFIG_THERMAL) -static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) -{ - return cdev->ops->get_requested_power && cdev->ops->state2power && - cdev->ops->power2state; -} - -int power_actor_get_max_power(struct thermal_cooling_device *, - struct thermal_zone_device *tz, u32 *max_power); -int power_actor_get_min_power(struct thermal_cooling_device *, - struct thermal_zone_device *tz, u32 *min_power); -int power_actor_set_power(struct thermal_cooling_device *, - struct thermal_instance *, u32); struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, void *, struct thermal_zone_device_ops *, struct thermal_zone_params *, int, int); @@ -449,18 +437,6 @@ struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, void thermal_cdev_update(struct thermal_cooling_device *); void thermal_notify_framework(struct thermal_zone_device *, int); #else -static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) -{ return false; } -static inline int power_actor_get_max_power(struct thermal_cooling_device *cdev, - struct thermal_zone_device *tz, u32 *max_power) -{ return 0; } -static inline int power_actor_get_min_power(struct thermal_cooling_device *cdev, - struct thermal_zone_device *tz, - u32 *min_power) -{ return -ENODEV; } -static inline int power_actor_set_power(struct thermal_cooling_device *cdev, - struct thermal_instance *tz, u32 power) -{ return 0; } static inline struct thermal_zone_device *thermal_zone_device_register( const char *type, int trips, int mask, void *devdata, struct thermal_zone_device_ops *ops, From patchwork Sat Oct 12 06:52:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176053 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1778003ill; Fri, 11 Oct 2019 23:53:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMqN/Sr4Gk0/s20KUmOFeQTrss+ZIr0ZTce4ax7SO+iLlMJMXs/jWWiUxcYxYeoTNaEHxj X-Received: by 2002:a17:906:2961:: with SMTP id x1mr17710169ejd.91.1570863216342; Fri, 11 Oct 2019 23:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863216; cv=none; d=google.com; s=arc-20160816; b=OzJfH43njdNXrgEJAs/3g3F6e/en05qFkznBOTXBNYVb9EOECBRLYKU+zqQ4HLOriC +t7BPi9Py3tYsg8hBm6pbeSej2xD3wYJ0WX89RGNEkn+vOeuuh3Oz6ABuj1YVabMyx5s ldaooOOPY5DH5aeT5+MLnrY5uEuyMDnlYT92K7N0yg18a55FiwTyG+ypp2uC9qp5xWI3 vQwZ+dVAoK2c4yQtV4+29dOrWd89gJpInwe9LZGAsSLbcywmxLhVN6db0fW93sf4W74l ZXbweGwIZB4liZnhz7aifzu3+NzdPaWAtBOTofTUu6VNkx6Hav1M2Jlqv0ve0gKIVbfq qEMA== 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=e5zHV1yxkD6dbvO/5O4DOC0P97SiQKMYMWVdcBqIV28=; b=ij9QzwrPcWstBgeCcdjYWec2s9DTfxMT6t30Mwk00mxIzBLtUik5zkFAEx2+b9E/KX EysXYKjll7CVp3L5EV4+9JpvvDuP4EWnHAbbZnakKEm0Py4xcHIGuTFej9UuICzNo2cX 3wdBSkjoHqAR5PEwCVX60w4f9TI1YaXha7yNbJuu6LhZhJLDDpAWtNKkRojnSk9cuQxl aoFELnGQEfia9/TkPBZyQHcJs+6RMrXU1NgVNR9GtyQMci+v975uOfYnAIf1ooi5gZjL pJGwYTObq7c0bQFljZqxgoAynQp4LDyxRnjoIRKnqFLlURjHVnLUbpLSfgpP8lp88gDI jRqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MfsX1wPM; 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 u12si7145433ejt.21.2019.10.11.23.53.36; Fri, 11 Oct 2019 23:53:36 -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=MfsX1wPM; 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 S1729174AbfJLGxf (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:35 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:33850 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728842AbfJLGxK (ORCPT ); Sat, 12 Oct 2019 02:53:10 -0400 Received: by mail-wm1-f66.google.com with SMTP id y135so10776125wmc.1 for ; Fri, 11 Oct 2019 23:53:07 -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=e5zHV1yxkD6dbvO/5O4DOC0P97SiQKMYMWVdcBqIV28=; b=MfsX1wPMA6F6IS8Pcpw3SsuC+GiBazsQyIjCf6hugUalSLbHrI9BMSj60fA6l3sjka 9XWTPWpQa0K5GHkYDjp84oOK4Gq8ToUHdePTHvmbaWIjJ4W8X6J+PJy8BXe1S1GSSXUF yZsxdZtVX51rWN8TiOLneS419TGoDPs5GQOQhqBzT6GqMIkKw6L78czFfUa7EQ7ujJlB SsHIdobSBEUQq+813GlXAd5SXsPcfbJGzAegHV5LHWV1gTneSqWImasUwKzVr72AmLoR uYHzLyZXA5j2+edcMmT3xVvN1fGxjhaHDOyDKPntpz4omwSIeEbSypJOvGojZWuJkHZL rTtw== 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=e5zHV1yxkD6dbvO/5O4DOC0P97SiQKMYMWVdcBqIV28=; b=SV4cX/pFnVQY04mTvbvAq/Tngyvrfk6DQ2KRXfr+Uy/n8VOWpyiGKSG8bgZVpn5HMh mFtS6DcW1kjsGnbhUALJFa73Kdhhve+JSvDPLEqZz6I9vaoL3RBq2tCLr69oQR5rVuMj y0ge1r8x3b8Xjc3oNHUSsLogziJLJHswSeK9Wes8VNzFAdE9vpgchhyIdUHcLxMrgeQH T3dY//1EHjr6sbQxYBHnqFQOHblx7xaRrtUyzewyoO65moSHge64K99vUjPyBiEPOslB HgkCRVD3DevKxuChe45tKob9UFRNSM31+jXWtLDMLdaVftDXE5JXbo/6i+/qfkeCg2+h YFhA== X-Gm-Message-State: APjAAAU/CmBdwnrmFP9PoadDet0YqU/YVOxalrYEnO6hqclvpzVZdUzR uuGMs1rbEWiW9IZ03dtFvOpXbQ== X-Received: by 2002:a7b:c7c1:: with SMTP id z1mr5690097wmk.61.1570863186531; Fri, 11 Oct 2019 23:53:06 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:05 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 04/11] thermal: Move trip point structure definition to private header Date: Sat, 12 Oct 2019 08:52:48 +0200 Message-Id: <20191012065255.23249-4-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-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 struct thermal_trip is only used by the thermal internals, it is pointless to export the definition in the global header. Move the structure to the thermal_core.h internal header. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 13 +++++++++++++ include/linux/thermal.h | 15 --------------- 2 files changed, 13 insertions(+), 15 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 5953bb527ec2..6f6e0dcba4f2 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -58,6 +58,19 @@ int power_actor_get_min_power(struct thermal_cooling_device *cdev, struct thermal_zone_device *tz, u32 *min_power); int power_actor_set_power(struct thermal_cooling_device *cdev, struct thermal_instance *ti, u32 power); +/** + * struct thermal_trip - representation of a point in temperature domain + * @np: pointer to struct device_node that this trip point was created from + * @temperature: temperature value in miliCelsius + * @hysteresis: relative hysteresis in miliCelsius + * @type: trip point type + */ +struct thermal_trip { + struct device_node *np; + int temperature; + int hysteresis; + enum thermal_trip_type type; +}; /* * This structure is used to describe the behavior of diff --git a/include/linux/thermal.h b/include/linux/thermal.h index fae9ff2b079a..88e1faa3d72c 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -343,21 +343,6 @@ struct thermal_zone_of_device_ops { int (*set_trip_temp)(void *, int, int); }; -/** - * struct thermal_trip - representation of a point in temperature domain - * @np: pointer to struct device_node that this trip point was created from - * @temperature: temperature value in miliCelsius - * @hysteresis: relative hysteresis in miliCelsius - * @type: trip point type - */ - -struct thermal_trip { - struct device_node *np; - int temperature; - int hysteresis; - enum thermal_trip_type type; -}; - /* Function declarations */ #ifdef CONFIG_THERMAL_OF struct thermal_zone_device * From patchwork Sat Oct 12 06:52:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176046 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777763ill; Fri, 11 Oct 2019 23:53:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqywimUq3cvJt9GweFxCMk50twC0ebKHu+k7MwYz4tE/guCMVGolUgMI0cG/D3A/L9XUdLRC X-Received: by 2002:a05:6402:1519:: with SMTP id f25mr17650934edw.65.1570863192362; Fri, 11 Oct 2019 23:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863192; cv=none; d=google.com; s=arc-20160816; b=bn+953P39WEHebPW8YXM0UT3j0sNApq0Qe3r7XEVdXmGMLx/+f3XrCnhahBhAojjrU OcsdTbhRQIt6eo3sr68xr3antH9xHixjZa4qTw8b+m/5Gd+QW8YPEUeGoW6YIZIHl38M HRcItQk3sW8Jt1vRpH4eRAYkNeIn1Q9jKZvrSSgnDsmZgzwKmRhG1tMJ4VrRmNHBOyn7 8+SQRFodB0OxNKnitZFY9EFVZXcs7pnHwoldOx/Wssry4OKW9YJoD9/IgxJ+NskrxiYM 0ryfvCnepJT3YToW8C4mRBfcx3hHr/pCDdNwpC4cykKfZOSew+IPAQV687YGkQSKfock T60g== 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=MOqGp6N62GYRWc7Fsvh/EkbvR/AOeQrVY/a8V3x3WKI=; b=R6YR/1nkE0e/Q9AKjtWzlQogBxlIEUVTXuBba699Ba9411g9fdM1BP/NlcWtB0kwg8 ly/wNaSb/cq7+ANmEH2TJhoVzajiOtiar43qDrhNz9NPQn/KtwHc44H94eXCKtpdc900 sQ6RZtncyo/g6lvRyCT6CNdWlwqxtL6PspnrcNQZ+x+H8sBQ2A6ndeANlTQpoHsNToTL QsSOJFyU4K5D/uBKjWpC2gS6NRFtUwvTJtx5kr2zT/Bw391xky9ldWOI2f2G7b8VkoIF ODBbRTeJ94gt903lHK6pMD4+3ebWtQR7cZ1gj/0jMlY0rGjRIOMTKGQE9mAA7FHsJpwB aMBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="middy/KX"; 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 j6si6603684ejj.37.2019.10.11.23.53.12; Fri, 11 Oct 2019 23:53:12 -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="middy/KX"; 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 S1729052AbfJLGxL (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:11 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:33854 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729016AbfJLGxL (ORCPT ); Sat, 12 Oct 2019 02:53:11 -0400 Received: by mail-wm1-f68.google.com with SMTP id y135so10776174wmc.1 for ; Fri, 11 Oct 2019 23:53: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:in-reply-to:references; bh=MOqGp6N62GYRWc7Fsvh/EkbvR/AOeQrVY/a8V3x3WKI=; b=middy/KXn66SPa/ZVSSjJQb1uEc7zwjKuunyzcH+4pvfWYkDB+7mFIqXayXvFj6QEr g9zzy4B7MvvEmifCJM1Zk8vMVy9jj2ML2RZnHMcW49IBikJCbilxBWJMUFh3mIMKLtFI GGrhK1qHWMjrjHxAVOJFguHBgGtbobrmMPgQQz45U9lZ/Jb3Jk35kwMkb3LKMhA9J+/U nJa5UMAOcWs/9U1v8iFWosAkk5eKmWd1UHwl+oGtaSwwVtbKTmpqsB4ua9DiBHEdiq5X tiTSCoa8oiUMQPTqQ0KB2BUIeLK3ceuI9vh6agO+v7Al2FxLZQ9p7SmTfvYVn6XQGMxM 4x/A== 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=MOqGp6N62GYRWc7Fsvh/EkbvR/AOeQrVY/a8V3x3WKI=; b=HIJsFU12IUlmNqQc7047UgPoHJ97ySfvN6QQEnHb5cqR0qReoW4fPTZ4YPQsSv+B7U lCrO2Gx2do/JWKk/r5p7nZ+i4EVGBWYcvuMbS4lBu+pFoobwQQVpauTcLwE64ddpTAxB /2auqWszKowg4YLQ3v5NZzF3IWxexJsxnUIw2is8gGz/tDMV+AiQMWxIkD18Udh2RZ23 CZASdYqeL8kVIJFiV4Rw55CC3Rx/SBKVRAdERiSWdieGF4ylkGcBA/2DeMPwyjAZKUMp BnfGpqaZ3hLezajxQ0+ujYy7J0ew2mNjmF7SualzqexW8yY+CNg0KL6ggW9LFz+X7hzr 96UQ== X-Gm-Message-State: APjAAAXfMP9GWcMNp1jdP7wJwPLcuAF1XqxEwe9KNOLam5fI3zCCCMwA jiKDsJzbw7Ra+mqjzK7/HiTNRA== X-Received: by 2002:a1c:a697:: with SMTP id p145mr5714929wme.24.1570863188994; Fri, 11 Oct 2019 23:53:08 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:06 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 05/11] thermal: Move set_trips function to the internal header Date: Sat, 12 Oct 2019 08:52:49 +0200 Message-Id: <20191012065255.23249-5-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-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 function is not used in other place than the thermal directory. It does not make sense to export its definition in the global header as there is no use of it. Move its the definition in the internal header and allow better self-encapsulation. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 2 ++ include/linux/thermal.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 6f6e0dcba4f2..301f5603def1 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -72,6 +72,8 @@ struct thermal_trip { enum thermal_trip_type type; }; +void thermal_zone_set_trips(struct thermal_zone_device *tz); + /* * This structure is used to describe the behavior of * a certain cooling device on a certain trip point diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 88e1faa3d72c..761d77571533 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -398,7 +398,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, struct thermal_cooling_device *); void thermal_zone_device_update(struct thermal_zone_device *, enum thermal_notify_event); -void thermal_zone_set_trips(struct thermal_zone_device *); struct thermal_cooling_device *thermal_cooling_device_register(const char *, void *, const struct thermal_cooling_device_ops *); @@ -444,8 +443,6 @@ static inline int thermal_zone_unbind_cooling_device( static inline void thermal_zone_device_update(struct thermal_zone_device *tz, enum thermal_notify_event event) { } -static inline void thermal_zone_set_trips(struct thermal_zone_device *tz) -{ } static inline struct thermal_cooling_device * thermal_cooling_device_register(char *type, void *devdata, const struct thermal_cooling_device_ops *ops) From patchwork Sat Oct 12 06:52:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176048 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777828ill; Fri, 11 Oct 2019 23:53:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzI7m14HirdJIG/bKCYehDO3a+anF3MZR9zOFcJU3Y/B03Szizrm+ogCF/E/ZfEQet49h94 X-Received: by 2002:a05:6402:13d6:: with SMTP id a22mr17435706edx.165.1570863198936; Fri, 11 Oct 2019 23:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863198; cv=none; d=google.com; s=arc-20160816; b=mPrFvqTWMGTk9kkE5nReMQnqeG8PmTdCwc/KOVMTA3n2+CoatF5D9fZnMd40UbpkS8 rl+y1OhDHiSd6QhXt0hVZuiM1N7+9Qqv0nF/Uhj7CIWPZGo7TGMLobgueZ3qJp1/F1Ij YaQfiODUVXmet4jpgIXxpY63+8QdIjvHDseglTn5K0E1jKNe3Owc9sPITsUSwFzM6dPi ZukAHKxA5zgPBMzkgC9l9enLxB0H6HAslT/kv9yodrxrPsC+p6Gy3OFYYiTGdIoSctpD ZVSkv67NFq7x74ZMTNo+w/vKPrkCipW6uYCmqS7KsO7aLN7DmXSGSg2MeqaX/PQK0wX2 jiYw== 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=oJUJQi9oxDEyvIdLCMbq2uvVsNGsqyuKnnHa3VxGyMs=; b=FgVh7tX+8BS/YWRlShktS3g+OdkgifPMzxwwqMwVya/AwB/U+Ez88QoHNL4hApY8FY ABTsuApNzMuLP3QpXZh3ZJ7X9Zg5soXsA1c97AxwEOvfoLnk08fNhbEQgvU0dWAsVCST y8OyGn04AJr4K1aAxshxJq4GpWp60L5BXv1pybs4bCfjGoVYGDNEO8q2pwQZ5QSsxipc FzgeaID43jjONysDiCXWhqmPRC8oN0x07EhmNHouqFGHCDwtXuMYTY73paiWSUCGDIUq yuCz97wmwi16TgBkHBZD+tUwM+gR7pbmdxv+ovGYa2N3i3LvuoVDaoetBgoP8/VzITrl wMJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rru5RL0f; 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 f26si7033787eji.55.2019.10.11.23.53.18; Fri, 11 Oct 2019 23:53:18 -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=rru5RL0f; 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 S1729085AbfJLGxP (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:15 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38401 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728878AbfJLGxM (ORCPT ); Sat, 12 Oct 2019 02:53:12 -0400 Received: by mail-wm1-f65.google.com with SMTP id 3so12064724wmi.3 for ; Fri, 11 Oct 2019 23:53:10 -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=oJUJQi9oxDEyvIdLCMbq2uvVsNGsqyuKnnHa3VxGyMs=; b=rru5RL0fM2DXupCKMZjiKQnH7iBHl3J3DsZqG5oDOaFs798N28j7GMQLZw/EmiBao/ gt1F3O6LsGkIY+olovxz6Pssclf7fzyN9yGBi+Uvo7x2C4lw6TK82JQRoa6oRK/Elge6 b5sd+3y47Ae4NokPD2QFHEWJ3ttBXxgJLcuFiqyXpPkfXtr+PNuQoYRoEQYDkO1VJWG1 axj15r/FNybiPwx/ombb4umc0lERtlTh9etngpSc7VbvHmcPey6c7VpQp09fSS/V6D7Y VoGmOS3xJjXiDJleeW6dsowLv09ME5fyLgh9/tX9GNXTb59vP9/e9jfcIOrIGEAbn8Uu 9ENg== 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=oJUJQi9oxDEyvIdLCMbq2uvVsNGsqyuKnnHa3VxGyMs=; b=DCP7dIwp5ReOjNpfyi0Vgk04CL3GZ6TAireNesl/a4g2KaQA/a4XHmVg8LFyf6pF/w v0waxVDEVx9i4tTqIJfQW42sdxKi7OD6lyTBei/Tole/RxP34kc9w9G/MVb3Sufg8ocv USwA7j0U1t22plBh6RYJrGFxX7zoDZz9YNZGSTIdppbe84z845RkoHTvnxPzcr0HvWwJ QMaQv8uZODWDQfCQmQgyCHU5CXhFck0+sin9mdrs8PD7C34TAmzq2Xf36UocZOon6VhS oitTSQZ7wSTWu+ssn8eQ2QxZVV2DpGfuIjbveEYQZ6w9927ipfYS836FqC9nzyiqXR47 c61g== X-Gm-Message-State: APjAAAXgHSk8GWQEVk5ItuQ6zHoVkIsODscuxsqzR/3o6hE2pCeIMCvc YUJ4Y52mPd67T+uuRmK3NwYDGPf9C2U= X-Received: by 2002:a1c:444:: with SMTP id 65mr6430067wme.84.1570863190047; Fri, 11 Oct 2019 23:53:10 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:09 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 06/11] thermal: Move get_tz_trend to the internal header Date: Sat, 12 Oct 2019 08:52:50 +0200 Message-Id: <20191012065255.23249-6-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-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 function is not used in other place than the thermal directory. It does not make sense to export its definition in the global header as there is no use of it. Move its the definition in the internal header and allow better self-encapsulation. Take the opportunity to add the parameter names to make checkpatch happy and remove the pointless stubs. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 2 ++ include/linux/thermal.h | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 301f5603def1..c03a07164ca7 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -74,6 +74,8 @@ struct thermal_trip { void thermal_zone_set_trips(struct thermal_zone_device *tz); +int get_tz_trend(struct thermal_zone_device *tz, int trip); + /* * This structure is used to describe the behavior of * a certain cooling device on a certain trip point diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 761d77571533..a87f551d114d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -415,7 +415,6 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); int thermal_zone_get_slope(struct thermal_zone_device *tz); int thermal_zone_get_offset(struct thermal_zone_device *tz); -int get_tz_trend(struct thermal_zone_device *, int); struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, struct thermal_cooling_device *, int); void thermal_cdev_update(struct thermal_cooling_device *); @@ -474,8 +473,7 @@ static inline int thermal_zone_get_slope( static inline int thermal_zone_get_offset( struct thermal_zone_device *tz) { return -ENODEV; } -static inline int get_tz_trend(struct thermal_zone_device *tz, int trip) -{ return -ENODEV; } + static inline struct thermal_instance * get_thermal_instance(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, int trip) From patchwork Sat Oct 12 06:52:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176047 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777793ill; Fri, 11 Oct 2019 23:53:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyI1OpRn0s5vMTXo4foTDdyCQXHYA+mwC+liLphul5HoNqzbBBqIh9y8ZLKK2Btv5TIxFZV X-Received: by 2002:a05:6402:1252:: with SMTP id l18mr17427773edw.64.1570863195456; Fri, 11 Oct 2019 23:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863195; cv=none; d=google.com; s=arc-20160816; b=pdiLWv9aweORBukH+2NVWxNtBvWUw+/f/NxrGukopPyEDDXWxllVPmle1/r3S/3KBE npVNgI9d0if+6J8Cz/JBzXpgriRiE6Gp8vmmMfh9o0ciXBi6dw8VM+P+C4TbkRrL/fKu uX5ymMXwkVkXLXJyIKf9jkm4Tv0M1acDalJD/7nXkCi5hNqklAZZ2lTKwNelzTRh73Rx BrPS5Y93xJuavd+/3tF14cPkGD0ZYWEdKPvqiv7sv6TgCGC0HYJoruRCFExRuTY16TVE a/xhnxf0X34vsylG94aWPUH93NQ9x0VXJbKfAS5PtAW+vRAXDp/OsUKOBeC13M3VGxjq mW2w== 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=SXf5g+t/yGsZp6ewuskUKxJwRRGrp4eeV2tieQBqK28=; b=T3a8Iyd5XHaKaQ7eIDXV618ncOgH3ylAsK6WJPFlE/i2niAcnnhMb1opRJ7T3cj5tG Vl/MlIj3BMeAgqornTNmnDMjwIclWIhjp6LKXDsWr0JDXym4eTlshWcCTrefN5PEQ6Nl rkESpDgCHU3X+MJRDN+BZRwRuRQloqL/SncZXdgqilOcghKgmhW0N+cRXi2OMULh1WRB v9S8ijBSB+kX1aV0mTA/ZK//+sbj3QYdr+V71D2qz4QqxUFQcb7jzecoMMSqrDGopzuR aYu6jeqW1AnopOr2mIRO4dI2CvHytf9ZkZCNFMlHZCzhApsAGiNx4smIlBWH6L2iSYsK gIAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=it17UP1t; 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 m5si6923208ejr.429.2019.10.11.23.53.15; Fri, 11 Oct 2019 23:53: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=it17UP1t; 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 S1729073AbfJLGxO (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:14 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54912 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729016AbfJLGxM (ORCPT ); Sat, 12 Oct 2019 02:53:12 -0400 Received: by mail-wm1-f68.google.com with SMTP id p7so12349576wmp.4 for ; Fri, 11 Oct 2019 23:53:12 -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=SXf5g+t/yGsZp6ewuskUKxJwRRGrp4eeV2tieQBqK28=; b=it17UP1tuJNxRx1MPlsBRuOThRkCOSByRJWl935eKbc0QXiAITTY1+j5z3uN7yMoK4 Q/+njkVzsLPkz7Qkvmbmg60GMPEJPwIAj0WUAQ5cZp9zXUNG3foLjlcL4hlqqAkUWhi0 EQAixh0ZmbWGucRLbliLqVWWslJQ27R2g7b+ccvytkPZBIdVJw7ku47UCxBOmoBMf7tC twIsUj/nOY4JPpGlyyePc7IJFhjQjF3RqxZCr29EaivSr1inTJzKY2J9zG/rDjZ+QRX+ FKWyglUysAr+neS1BuS9Cgr+jsvbOTB2PQYElC66AkOb8s+pzh2lDoxhfd2pQK7L4jz/ D2nw== 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=SXf5g+t/yGsZp6ewuskUKxJwRRGrp4eeV2tieQBqK28=; b=TB2ENjb1DdkBH6uGghZn3nI6RFQa864wD+WtfecULfV454i1iCAjXaQ9Beu8t5gBAi 36OO8Hdx0DfAPBlQRMKQE1WxsrdrvDm66MHBJVfBFtu9rGnfA9Smp6GINC3LTPxayRTz Co58mSeurBTlc69CKayFcP4a3KBZVP+ngEok5oz7FXwTNeD0xAeiREdzCGxGZhJ/w/zX 3SHs3VPlKiv+LZOj64p4QMFiFmts7yghmkaXp2YDwFKxmNw/6WwmRaF1ZYIA4lnN3bkV HK4d+hclPtxEZ1+DJA5ZcMKgb3adVGFh6xO++Fxxq+wIoMlP1cRjWHH3cqycCq0l+ZPg 3FiA== X-Gm-Message-State: APjAAAVtQoF3QBqpCUret2eiu6+jleCJ8Kq2j51gnUHHVkw84yITfaCc n7cwul5LY/j5yN/Ozdq8omDRgxNTpHM= X-Received: by 2002:a1c:a711:: with SMTP id q17mr6499910wme.1.1570863191303; Fri, 11 Oct 2019 23:53:11 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:10 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 07/11] thermal: Move get_thermal_instance to the internal header Date: Sat, 12 Oct 2019 08:52:51 +0200 Message-Id: <20191012065255.23249-7-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-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 function is not used in other place than the thermal directory. It does not make sense to export its definition in the global header as there is no use of it. Move its the definition in the internal header and allow better self-encapsulation. Take the opportunity to add the parameter names to make checkpatch happy and remove the pointless stubs. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 5 +++++ include/linux/thermal.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index c03a07164ca7..c75309d858ce 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -76,6 +76,11 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz); int get_tz_trend(struct thermal_zone_device *tz, int trip); +struct thermal_instance * +get_thermal_instance(struct thermal_zone_device *tz, + struct thermal_cooling_device *cdev, + int trip); + /* * This structure is used to describe the behavior of * a certain cooling device on a certain trip point diff --git a/include/linux/thermal.h b/include/linux/thermal.h index a87f551d114d..4436addc0e83 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -415,8 +415,6 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); int thermal_zone_get_slope(struct thermal_zone_device *tz); int thermal_zone_get_offset(struct thermal_zone_device *tz); -struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, - struct thermal_cooling_device *, int); void thermal_cdev_update(struct thermal_cooling_device *); void thermal_notify_framework(struct thermal_zone_device *, int); #else @@ -474,10 +472,6 @@ static inline int thermal_zone_get_offset( struct thermal_zone_device *tz) { return -ENODEV; } -static inline struct thermal_instance * -get_thermal_instance(struct thermal_zone_device *tz, - struct thermal_cooling_device *cdev, int trip) -{ return ERR_PTR(-ENODEV); } static inline void thermal_cdev_update(struct thermal_cooling_device *cdev) { } static inline void thermal_notify_framework(struct thermal_zone_device *tz, From patchwork Sat Oct 12 06:52:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176051 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777890ill; Fri, 11 Oct 2019 23:53:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqx40XmDYfyrBiZxGfJSV2BTN7UpNSJZ8z5UHf6/JucwZafzu6/HO5WxG/qxzqElAc0o0S9w X-Received: by 2002:a17:906:250d:: with SMTP id i13mr18166831ejb.275.1570863205426; Fri, 11 Oct 2019 23:53:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863205; cv=none; d=google.com; s=arc-20160816; b=NLCyhCtbvOex3w9vGPl65zo9yJoCTjBjnjQch0nV7nSdUXP2KBERPJ3ytxHUI0JPqM 4rLvzXH9aLXHp7e1QL0N8DIwiTEpifhJbbpTyz/Y1zWtF1asBhYj9xtGzwAql6IxiyTf vOl4eiF81KRuwHWzpSsc3b5KgGkVqCSye1x5xHeMfiXHUCyZMNZyiS/dEVB9wirq/CE7 iw2LloQ0hKTJjmEMl8qsSuynH/5V1LCXOgpZqLFLgpj2OKvloX9FzW0WB9b+LYEc22+U Xqx/kvSG1ydLdTA1GkJkta0FAV0+ttNdhSqiFRiGCAmQWEdfV6z6tfWhF8qQg6VpOliL zbKA== 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=pLeOxxToFlzhf4ijtkJsBjt2I5eCWkMMUorTQgLbLE4=; b=fjM6l5vbwmokK+gr7N047VlX3YsBiFild5wItsECNAoKEVDOl5vKXsWCNpY3cQnsSe oj36jdvIIxoYWu7iiIsAnqiXzZl5coFYafGcLndzUaCOl5xSakab/0x77n6GpEdCMemo QvC8upcfZ5Fv0Xnk8Mr4a26rK9QQrnKMlvnPMwXs8mYU6ZyZ1QjuGuhhUbYAcn9fp9aX Bemj7wfWvTqxq0LgbDRcWm/613kngU+OXItQgvPAlkrBlgzJ6/406gRBmFKo42jSyuEH RdUzoCHXR/kLXzbANVN0uvAGA3q06EBO7jEVXjEIg6d90DbdDC8NhCQpHZXyulrXh0pW AdIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JybpEL8S; 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 f26si7033787eji.55.2019.10.11.23.53.25; Fri, 11 Oct 2019 23:53:25 -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=JybpEL8S; 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 S1729107AbfJLGxS (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:18 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55372 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729054AbfJLGxO (ORCPT ); Sat, 12 Oct 2019 02:53:14 -0400 Received: by mail-wm1-f67.google.com with SMTP id a6so12324918wma.5 for ; Fri, 11 Oct 2019 23:53:13 -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=pLeOxxToFlzhf4ijtkJsBjt2I5eCWkMMUorTQgLbLE4=; b=JybpEL8SzP1gopHe6/v2yw1y51wtcs1fuJB0dYf7mGfUjS3iYBN/CRa+RRYd0rjeG+ x8BctNK1HUAzfaNbSDjgmLHjMM57dTBo6emq8ZjevWIww1cIedjSAVZQY7SlLcK9wV+0 ys5H5G7RaE3WbuAkYrmKk9GAoy81UIP3wfvyKxsYctDwCf4sexj8RFrkScz3QgLDu5v0 g4TWxoLW9OanFianj4yoC+/vbVyaxtnaRZP1PIC7MFPZbbtDPR5HZQMWnY1tru3MOMkt zEtQ8xrwjHw62uA1od4g9xFDkaKQslqhChdUI174bkfIofjmeo5in2OqFvGrpG89KV7s Sk9w== 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=pLeOxxToFlzhf4ijtkJsBjt2I5eCWkMMUorTQgLbLE4=; b=ZMERGl/JQkSTVzDqh63PBMbCgO5ZZ6X1xxCKFmqKtWKuw/vVOeIB/X9SMuvPE1gN+o 7YsE2i6lvKiA3mDHy2+xIkL0YxLCqoyeQLzdtVh/iK+Q/nDHvqySAjAq+/5AU1RK8zUJ y+EdDNUMmhNUHRSO65VYiaJlFidVVX0Y58HvNRz0Rx6hDHsDHHvxsnM5b/rFki0BKjWh 2C8h3Ze7i4lM0S7hlSn7IUxY4T199sQQrxSxdMSqhnRT5kN3ol0mJOyjFTpPRROCa+7J DxmtHNZK5Ig7G1NyfvGWMllo4GO/Nk6BVIFiswbIQT2eHBqVe4O9ELffhwcORU7XDM61 DgbQ== X-Gm-Message-State: APjAAAXZMLFpMQqBwx540Lr99dygpADn/oJklcc0RUt1E/YyDY2HMFoO vB2VhIUbkm74GSv2BjkgIj1mju8mJII= X-Received: by 2002:a1c:444:: with SMTP id 65mr6152319wme.73.1570863192353; Fri, 11 Oct 2019 23:53:12 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:11 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 08/11] thermal: Change IS_ENABLED to IFDEF in the header file Date: Sat, 12 Oct 2019 08:52:52 +0200 Message-Id: <20191012065255.23249-8-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-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 thermal framework can not be compiled as a module. The IS_ENABLED macro is useless here and can be replaced by an ifdef. Signed-off-by: Daniel Lezcano --- include/linux/thermal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 4436addc0e83..d77baa523093 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -384,7 +384,7 @@ void devm_thermal_zone_of_sensor_unregister(struct device *dev, #endif -#if IS_ENABLED(CONFIG_THERMAL) +#ifdef CONFIG_THERMAL struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, void *, struct thermal_zone_device_ops *, struct thermal_zone_params *, int, int); From patchwork Sat Oct 12 06:52:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176052 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777921ill; Fri, 11 Oct 2019 23:53:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqza+QCnVuoLwN59GRhy8QJcgqk9DTpyWhEKmFicmfEidB7OJU3Urjsv9Vu0bf/Z5Cri6s/i X-Received: by 2002:a05:6402:3046:: with SMTP id bu6mr17464555edb.276.1570863208554; Fri, 11 Oct 2019 23:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863208; cv=none; d=google.com; s=arc-20160816; b=O4Cj75evZ8f3qYtpOHL+VcVNRWjTqeJG7FqV2G7lwSFxUViSBHY1V7nLnJmCGtwDsb pxWmWTkU7o8HmDLxSaon6JCgIqjnB82qxn8/bF6DlFiVAjLEdi00hOwLIjGpLx6mTvFy ++quTiApL3SYeoLgvvf02Re7gQYMd3sPtLplqlbvwN6kZNhm8lX8duKTBW4uZO6ld11t mihAGx5CHL4VH+jAxP5P+SpmU1ifvO2Ylx+9vqBEwl1Y0Pu7Z5cXVZOJvcCats7L1WYu 9GyREfaLKaUT2kYOH2+ZabbltWorE0p47IVyjp/KY3FXlYBN/n1fqCj8Ng12JTV5LqC1 xcjg== 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=vSl/Ur1B9aK/gm2LM58l+jZvn+wzF8KR6Icoca7PTeo=; b=LmCIqN1T1aCZeNNbGwtoh+Z9Dz8lRgsFssK3YuR+AxYT5BlSdtt8eTOkFeGoEBCdHC YkNHaTeic/tiwvE2cdMUC8SBDxVelESXJOqohYdY8li5C5AuO54MiHQbPolGD8+tpI7b dBEePcrDd6pe0BisBmtqPYntssX7kLuHAbcnr7WG+/Z14WjQJSQCFRSUQM+Q8ii469EW LCWsLNOntr5ev7Ms2+fFf1vtJ52KHJggRgp3mphlu5rAa8ow6ZuuuUE67h2Qyayr6i+0 DORtF3l++nxl9p6jws6T357tLDVN07GwIM60PfFAWwIJ7SkJ/Lzermy+5Hnp9OaFuGkL KoMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tswCzgp7; 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 u12si7145433ejt.21.2019.10.11.23.53.28; Fri, 11 Oct 2019 23:53:28 -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=tswCzgp7; 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 S1729155AbfJLGx1 (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:27 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:36595 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729071AbfJLGxP (ORCPT ); Sat, 12 Oct 2019 02:53:15 -0400 Received: by mail-wr1-f68.google.com with SMTP id y19so14100605wrd.3 for ; Fri, 11 Oct 2019 23:53:14 -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=vSl/Ur1B9aK/gm2LM58l+jZvn+wzF8KR6Icoca7PTeo=; b=tswCzgp7QkQx0AP2oQ0KYfFcbz/UIZZxnLtlyPNgDA7tENRvpjRyuCnTZ7UFzWxhTr 1m2Ss6xAd8iS0646KxYUqPFBdvXU9TZTBudSnjwtJb+SKPXK1TzQIblugN4gJQjc2bKE 5naSLq++3TK/v3kcpGvacmM+TvsEdaRUGggltf4NdJrLIVP6BEj5pSrbykk35z5fwvmc ciuN1/a13/o8llkNXw3L+PbtGBiZLFkg6tUOeoxqk3TwIthUH+zQdlfDCazhuZrcxVTm QDRrqiLAVXeGxF78BC27idXeRQH9Bb6d2eun8lxyd/ZINpbRpwh1XtQbQxVoGl2HDh2r HvVg== 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=vSl/Ur1B9aK/gm2LM58l+jZvn+wzF8KR6Icoca7PTeo=; b=dzk3Gnu1esbWTfVGBuEz06BfGS0uy4nTWS61/LBaq5i1UUO7UZ61M9gphXDNBa6S4D pmfRnWA31fTGKW+jmvM7sADVzoJha25sZVUTWT9b4jmDeOMi+MRkoHsVdbP9KqCN0Vay W01BDt0yFdzy0Wna1r6oD4dncD586waXc5M42zzeeglBmgBgG8jXg/aO7umE+XtxnPxF MpuBrA7PEnmBf57pE9zCJQHMqlxzQuch6brYTmz6uM09W/LnC5r5L45vcrV3sgKOaYqf VdIxpE+ibE7DwwxtQo3qXuQGKpTxTHQL+hSqUX/gUjGQrosZdb/M/VyUj+N4B+zjTHje AAvw== X-Gm-Message-State: APjAAAW0U8y0rZYoQrAHqUGFHwkLzX1d297NcmVGcp2mQ0uUrUhSSTrd cd0O3ooy9BHmnU2JGLo3XiC/bA== X-Received: by 2002:a5d:53c2:: with SMTP id a2mr16296403wrw.10.1570863193492; Fri, 11 Oct 2019 23:53:13 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:12 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 09/11] thermal: Remove stubs for thermal_zone_[un]bind_cooling_device Date: Sat, 12 Oct 2019 08:52:53 +0200 Message-Id: <20191012065255.23249-9-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All callers of the functions depends on THERMAL, it is pointless to define stubs. Remove them. Signed-off-by: Daniel Lezcano --- include/linux/thermal.h | 10 ---------- 1 file changed, 10 deletions(-) -- 2.17.1 diff --git a/include/linux/thermal.h b/include/linux/thermal.h index d77baa523093..ae72fe771e07 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -427,16 +427,6 @@ static inline struct thermal_zone_device *thermal_zone_device_register( static inline void thermal_zone_device_unregister( struct thermal_zone_device *tz) { } -static inline int thermal_zone_bind_cooling_device( - struct thermal_zone_device *tz, int trip, - struct thermal_cooling_device *cdev, - unsigned long upper, unsigned long lower, - unsigned int weight) -{ return -ENODEV; } -static inline int thermal_zone_unbind_cooling_device( - struct thermal_zone_device *tz, int trip, - struct thermal_cooling_device *cdev) -{ return -ENODEV; } static inline void thermal_zone_device_update(struct thermal_zone_device *tz, enum thermal_notify_event event) { } From patchwork Sat Oct 12 06:52:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176049 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777844ill; Fri, 11 Oct 2019 23:53:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxivuD+pRCuCdf88jqYArVX/BY5DDSIW3JrgMaDKxtAshkOk9E81RGKZukQAfshsqFs8E8x X-Received: by 2002:a05:6402:1359:: with SMTP id y25mr3488811edw.183.1570863200412; Fri, 11 Oct 2019 23:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863200; cv=none; d=google.com; s=arc-20160816; b=YBkispUDzF6N81JnnxcoUtkEjaBHCyCmIHB4N0obLcVjsVaxbQdxbLWqCmYQFuSHrk il4B49JPsEg8dYl4IjH4oG9e48iNozlqkOpKLu7ibbM9gWLyNvWQjePXm5J0lZf7mubL ye+ipUh2bPX6vx3Xa7vrBMeBnEjQinO27KxNafe032PFKaAGKPvJNTgKxsrlTg7qolC0 Zl3EQhzN4Ue7vBzXVIPWP2DLgy6xHPZPwxwwPt45p2/IuMPiAwxNpWhRMvVxokzs0cfH 3/18dJfQIPbgzxFguMivdx32JVDLG2Lwad9EBtvSUu6S9XM8YHi2c4EZBm/wOJmyE6cq oW7g== 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=xYNaygMbd21QTie4NeAZZNYx9YnNHVu9c1OqSN5Gf6U=; b=v7QBz328AkV0I4tk8rsaxGWeQ0Pj4fp2BitY7mzckA3JXjiaF1jhQISBDArRNVtAYx zVfTaekpXcaHLp/xHP0FojDURmYtKc8RL3ul+oHW3/yHUNTKhy7YYcLTaiHGQn2L+dJG hEt/7dZEGPDPTqj31sDhMra1pnXGpRJ7zpifiDRgORDQvV9lzC75/M5i7pyZMpf2KV2t yuLxH47ok5bKDsBWXCAz1r3T/3OJudEWfrSZl3gM18hDk7iIwXVpiGNgcL9+T2gkgRD7 r9nmN1/uZ1ME1N4cKfpmw9uHJ8drTgCRMyGqn8/+geWAJF1uDoL+PyLW4sSrNqYyko+0 HaRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I3IF44u6; 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 f26si7033787eji.55.2019.10.11.23.53.20; Fri, 11 Oct 2019 23:53:20 -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=I3IF44u6; 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 S1729137AbfJLGxT (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:19 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:33324 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729076AbfJLGxQ (ORCPT ); Sat, 12 Oct 2019 02:53:16 -0400 Received: by mail-wm1-f65.google.com with SMTP id r17so10769351wme.0 for ; Fri, 11 Oct 2019 23:53:15 -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=xYNaygMbd21QTie4NeAZZNYx9YnNHVu9c1OqSN5Gf6U=; b=I3IF44u6t3ND7sZz0+JegnRFquaT8wyBcQgZnDZYJjkOm53dtMN0u1YYnfeakndm2/ 06GVx9P7IrJCWVCmZTQcoEcd+O49axRKnh9rKDTKwlGLQuR0OH1weuknLJJRoUTOgUE7 txg7zComQk04jZrPEDMG/Swz34kMNuE9Y8KAkJ0Iduk7ZgZRKtIOwhyISwSEVDsl2NdL kiwxJ5k4eTLAN65B66iw97wG5XugayifItdeMlmEeOeZBrpJxjFgcHluDbLeGdZozWU6 l4HYPilQfM7o2TFoMiwdUJzCR0O4k7fHZY7krwPIRChVfnim3RP9W2t82O4zhVEjzUoo 83Rw== 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=xYNaygMbd21QTie4NeAZZNYx9YnNHVu9c1OqSN5Gf6U=; b=TWxsMujOCMNczXQGDK6keK+baJTF8+tHqQM3V6xRIE+A2B9KMWYUcpqsAW+2B4ReId Ps8jSWn6NHY2ySNrAg48vpyByKMIWnqjexkWvxIS3SGkn7lGyvjuDvXAnfXibICJEP6y G6uZfC2G7kr3XvJWD1gv3H2qiMI/wFG4Qa5MIS7r0GqPK1tqAtqLxE2Cx7DmnuhO6s+d ixlXzqZH0DdkAFyTO9kU/EeJC9eIdPQWXz529V9+MXGllbK3d1gHx104QK5/+HiDaHSn MbiLQBqSwrjwASraL4YAdWhYV03ZxvH66S12PXquy789nRvr8OnFdwDI/RDJCUPCHktL YcRw== X-Gm-Message-State: APjAAAVGSI9NgoFyQWzoW8nHkNpPFYHYEzCdbluSlrXrFcIxyyYmJdj6 OUxtH5+QDTn6PBFnfdYVlVdyZg== X-Received: by 2002:a1c:2e50:: with SMTP id u77mr6567745wmu.64.1570863194641; Fri, 11 Oct 2019 23:53:14 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:13 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 10/11] thermal: Remove thermal_zone_device_update() stub Date: Sat, 12 Oct 2019 08:52:54 +0200 Message-Id: <20191012065255.23249-10-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All users of the function depends on THERMAL, no stub is needed. Remove it. Signed-off-by: Daniel Lezcano --- include/linux/thermal.h | 3 --- 1 file changed, 3 deletions(-) -- 2.17.1 diff --git a/include/linux/thermal.h b/include/linux/thermal.h index ae72fe771e07..8daa179918a1 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -427,9 +427,6 @@ static inline struct thermal_zone_device *thermal_zone_device_register( static inline void thermal_zone_device_unregister( struct thermal_zone_device *tz) { } -static inline void thermal_zone_device_update(struct thermal_zone_device *tz, - enum thermal_notify_event event) -{ } static inline struct thermal_cooling_device * thermal_cooling_device_register(char *type, void *devdata, const struct thermal_cooling_device_ops *ops) From patchwork Sat Oct 12 06:52:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 176050 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1777861ill; Fri, 11 Oct 2019 23:53:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwr36YwWGXT1ZRPhYuZo0RZysvLEZHW4v+r3wgFQtpgYBNk5ouyPKEmcmq7HrkokgJSkVSp X-Received: by 2002:a17:906:7d10:: with SMTP id u16mr18232774ejo.329.1570863202639; Fri, 11 Oct 2019 23:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570863202; cv=none; d=google.com; s=arc-20160816; b=GTst8ZAm9B/m9P7UZCUOScCzeKvuy52erz70dtsO2Qz8r1v3WRQWRoe5fY/Iq+ZroQ sHHpy0UVXGYOma6L70vpmdR3/cQXJ1wWL2wI/Mhw3+pW1BGm0dThbRnLt1KXiRTgLt+c gPoLVM5Kco+8LVeXV8iqvfKplI306lxgO/ih1BunxDEir13qk1cUJ/cpf1qa30ny8CdE 27Yu4via46u7ajPZa450uKkgaNm/rEDEPY7a5CK3GeLdi/IRxVmWEZmOdZxMcZ8M8QlH M3At2xZeuvqTOkC7yznhOTe0pMxMJkKLCYXRhl5feBEw6P7xNF8Uf5rEy1ok+UsNihqO BOLw== 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=rteKuts6TNa3FcVuHWLA6WnDYTAfCMs6+nc1PCbFmJQ=; b=EEOieNvM7Ngv6esmf6HnpqkOPRvAlrRdG1mlAOYjT6KdgVF01tK2IQ53uT0iMrPv+k TJI/RsroJpnfAAZhw0glCkSmgJF4s5mJDHX0IDyJyJnoUTDW8LlmCJkXVOZdftHC+zIo Jed7ZZGI+LxM1mEfbopF40W567SE4Ul2EidaqdlvhFV8rHdcOGKMmOAmxDMW7APchrKn 5e2DvafM2FcKRFpasBcOoFZpjeWDRKrt0co9NeNM0U3DV2xeS1EzIPFYLpYb6tIPY2/N R3oHcUZBI6VK+GhTyCWXP7UE2cKSc5IUagzxL0gGfyF6ZFiGnLlsDHwZuvkYOdyNAoit E86Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SQgl+K6s; 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 f26si7033787eji.55.2019.10.11.23.53.22; Fri, 11 Oct 2019 23:53:22 -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=SQgl+K6s; 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 S1729124AbfJLGxS (ORCPT + 21 others); Sat, 12 Oct 2019 02:53:18 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36409 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729089AbfJLGxR (ORCPT ); Sat, 12 Oct 2019 02:53:17 -0400 Received: by mail-wm1-f68.google.com with SMTP id m18so12065119wmc.1 for ; Fri, 11 Oct 2019 23:53:16 -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=rteKuts6TNa3FcVuHWLA6WnDYTAfCMs6+nc1PCbFmJQ=; b=SQgl+K6sNR2uq9Qca5Iss6ihuLcJTBrMZ1pAbWVUadX7jFw+xcyB0QURWWUWVz8y2R d99mU5a8wP26+xSf5dAuLaIfgAGbyEWKlpkFdDvL9AnTQXBPsgXqTZuwQ7yB7TAvzpF4 PAFnjYconaxdhsxvJvcj7V5kj+A2WzqaQCeefz+SrhM24rnCfY7OtsTLYuwegJDbbpp+ Zgfcf+3+qiHn9pqT+Vf047SH0nn7Z5wvxH+WSaTexklqKncnCF60c7Fay1GwGpsMM2dC 2jeFi4yUYLf1axQGOLXljZILelt4MWu1EFqtg0Qi++1uYucz/8TGhK9I6YTSxPwfPCSa M2mA== 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=rteKuts6TNa3FcVuHWLA6WnDYTAfCMs6+nc1PCbFmJQ=; b=F0oC2INftrxQTK6ceJw+KZAE8+u1ay0sejNIBM5dvXdCLQNWSIp6rd8J/8xi+uvk6s EC3f8iYcNezJtHA98ZVqDCphcnR96Gjl/76wuc1f729yJ3fjj9kE5iVfU0ESB7Oq4oU2 k+aQBMcmmZqSzz7uPqEopS1rKhqAOpnbvkE3YZ4O2p57sIdr1LeTW6igbA8UX75ZbHUp KodTHd46K2umQn40TVHVZqVsvqQydBo1nZeb71wU6fPc9ZrorjKHJHUghm3Qjb9brpIS BYufwYP7BNClixlhxDQDd2GwkbwUWNbxfzB0U/ZMGXKdTTBF/ezwMhwZprmnHMxNYwGk Ywtw== X-Gm-Message-State: APjAAAWhmHg0aK1eOBqao+JhU5jOQtfOnmJG5SdeVocjqMn+IxCSakpb BCNfrksSWnPgtIEgo3wmMA3xYQ== X-Received: by 2002:a1c:9dcf:: with SMTP id g198mr6384737wme.101.1570863195695; Fri, 11 Oct 2019 23:53:15 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:f437:29a8:ed69:7bab]) by smtp.gmail.com with ESMTPSA id z5sm17450497wrs.54.2019.10.11.23.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 23:53:15 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org Subject: [PATCH 11/11] thermal: Move thermal governor structure to internal header Date: Sat, 12 Oct 2019 08:52:55 +0200 Message-Id: <20191012065255.23249-11-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191012065255.23249-1-daniel.lezcano@linaro.org> References: <20191012065255.23249-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 thermal governor structure is a big structure where no user should change value inside except via helper functions. Move the structure to the internal header thus preventing external code to be tempted by hacking the structure's variables. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 20 ++++++++++++++++++++ include/linux/thermal.h | 21 +-------------------- 2 files changed, 21 insertions(+), 20 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index c75309d858ce..e54150fa4c5b 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -46,6 +46,26 @@ struct thermal_attr { char name[THERMAL_NAME_LENGTH]; }; +/** + * struct thermal_governor - structure that holds thermal governor information + * @name: name of the governor + * @bind_to_tz: callback called when binding to a thermal zone. If it + * returns 0, the governor is bound to the thermal zone, + * otherwise it fails. + * @unbind_from_tz: callback called when a governor is unbound from a + * thermal zone. + * @throttle: callback called for every trip point even if temperature is + * below the trip point temperature + * @governor_list: node in thermal_governor_list (in thermal_core.c) + */ +struct thermal_governor { + char name[THERMAL_NAME_LENGTH]; + int (*bind_to_tz)(struct thermal_zone_device *tz); + void (*unbind_from_tz)(struct thermal_zone_device *tz); + int (*throttle)(struct thermal_zone_device *tz, int trip); + struct list_head governor_list; +}; + static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) { return cdev->ops->get_requested_power && cdev->ops->state2power && diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 8daa179918a1..04264e8a2bce 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -45,6 +45,7 @@ struct thermal_zone_device; struct thermal_cooling_device; +struct thermal_governor; struct thermal_instance; struct thermal_attr; @@ -206,26 +207,6 @@ struct thermal_zone_device { enum thermal_notify_event notify_event; }; -/** - * struct thermal_governor - structure that holds thermal governor information - * @name: name of the governor - * @bind_to_tz: callback called when binding to a thermal zone. If it - * returns 0, the governor is bound to the thermal zone, - * otherwise it fails. - * @unbind_from_tz: callback called when a governor is unbound from a - * thermal zone. - * @throttle: callback called for every trip point even if temperature is - * below the trip point temperature - * @governor_list: node in thermal_governor_list (in thermal_core.c) - */ -struct thermal_governor { - char name[THERMAL_NAME_LENGTH]; - int (*bind_to_tz)(struct thermal_zone_device *tz); - void (*unbind_from_tz)(struct thermal_zone_device *tz); - int (*throttle)(struct thermal_zone_device *tz, int trip); - struct list_head governor_list; -}; - /* Structure that holds binding parameters for a zone */ struct thermal_bind_params { struct thermal_cooling_device *cdev;