Received: by 2002:a05:7208:c24f:b0:81:d631:dc8 with SMTP id w15csp409559rbd; Thu, 4 Apr 2024 13:01:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBRT3riEFHUqKBCprkqUrAs68sjH7dRIOFZiGhg03pZb3A+H863UqrlzH2ZVzzzdMJM2zI6Ak58g7wUYPEKgQgoIMXBtVJ+GRpCdZqtg== X-Google-Smtp-Source: AGHT+IEgiopU2Wl0wWGoX/e8nn3pKOvYxwwO9kNL/dt7ygaAx6hVamyC6hM0jii7Yf9BtNXWH4Ud X-Received: by 2002:a05:6a00:a01:b0:6ea:d61d:b555 with SMTP id p1-20020a056a000a0100b006ead61db555mr878836pfh.2.1712260884055; Thu, 04 Apr 2024 13:01:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712260884; cv=pass; d=google.com; s=arc-20160816; b=fMrK7TS+LMGW2m1dBqniehMdlgPgWyhx0MOo/OFnwglA/Tm/4SPIlBUNnxMgJRBHoI eiIjlhgUF5DjSiBy0PqVJHH+HBWIRy81S+VHHjtEMy1pq7JPW9MiCgOysYiqtY/5CEJG 01jLfyVR61lmuIecnswOppf8gg+e22z/PgLp7m2/eMa3p7zVBP5ZHeGUMVbr2Xuv1c+J Wa7IWjKnsRQXxIi1klkDfe6AesLtIub+85dwuXQvP9N6ktfs7PdtcZzcQ8g42PDXNqMD px7d5+bbEoXByKSaNyXGaNi8MAwuBn4M7qbSTmbkYzE1pYvipZi4WnKURPJk0NQ7vfeQ fS1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=PrrLyfFg7HbUQv7nCmwAGHnDoYm9ksN7DZQmscUxgOQ=; fh=pZcN3lnDPmzrIpxf+h+NFKrBfIYpRY/C7vEftEJzZns=; b=WaqiOx5CVtwcGuN+vQUlFcCo3R+I9m/L03PEJbrxbSIvwV/E/zOrvoYSUuft1OcE2f /uKLbe96p5x9kSS9K+/jwUAk0KMHBaPh9slcqwlFe5d7XIIUJ6z4Lx841ptKt+GY3RcH Jfjsa/JnpIunyBzJvkq+TJKfiOxFe9DqvgCeIBQwcCams2Co4/nf1sQl8/nWETAgrKq9 sLnSpKMIYHHpjI/Sva199hduJDZtUt3RYaVdaMGDtDSHtXPjBkoSQf7teHJwDi54iAgZ fLo9HexZMqlXq6zCdlWPryLNcRlkeXXy7jMD0UlHY718Vmo9myf+PfyH1Ff2JkY7sqSP 0Ttg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@rjwysocki.net header.s=dkim header.b=sDcofTuR; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-132039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132039-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p24-20020aa78618000000b006ecef1eec86si27190pfn.239.2024.04.04.13.01.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 13:01:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=fail header.i=@rjwysocki.net header.s=dkim header.b=sDcofTuR; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-132039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132039-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B0EC3B2B578 for ; Thu, 4 Apr 2024 19:28:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16F08134730; Thu, 4 Apr 2024 19:27:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b="sDcofTuR" Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17F5E134404; Thu, 4 Apr 2024 19:27:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712258840; cv=none; b=dPZn6yI0nQGUiBIJDV45vVVqMlT9XdOvw791tOwgHXU8zI+NxsINTDREbiNNDoPVo8lkS3e09Vw99u3DUGczIiK0/UGOr9e+reHiJKaey8smTb4MWXXhGE/d5SijJ3Mu1xIShAlGhGy5bK7mSR4ZsMlyz+pYVUtJy4IhMDeDopI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712258840; c=relaxed/simple; bh=vkdN9bc97p/devrra31F+aN1d0APMHfWHF3uqUbNmeY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JKBsofXKvs4gSl+8JqxgoLRYcHujCEUGTxtI8eN31m9lcrGvCyjKuaGJ7lvxaHCReFTiDnTCPZb3D3sNgF80Mr7VWuaGVbBquWvMCOFY7HN374lbuCL4FlKQxhPYvJRAURgSrxlr68bnKhiPTN++YYWZtCPcyW0yfPxvTXoylGE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; dkim=fail (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b=sDcofTuR reason="signature verification failed"; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 6.0.0) id 43b95b81933d4ea7; Thu, 4 Apr 2024 21:27:08 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id 10BEE665D83; Thu, 4 Apr 2024 21:27:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rjwysocki.net; s=dkim; t=1712258828; bh=vkdN9bc97p/devrra31F+aN1d0APMHfWHF3uqUbNmeY=; h=From:To:Cc:Subject:Date; b=sDcofTuRmD2N8fsJqjfbBVB6JnF71+i8SyTf0c7HiZLTZ6WJ/T8OZfvZmJ5pq66E5 cZLs66t9veKtstJvDvteXA3jOENUk+Dasf5JvnwOGJA2rMnf7jOu6NOpDDp4nqXhsx ZvfypW8W6v609L8KAgp5AyxPrKDKU0uFQqgoXwW/88chCsGsgDrqh+Bmf/tQPIdjB5 6ZSLqdFBaFRsaiptYXS2XdANvEj828mDq3upQ9iDY3ZsLTNYNPTRKSnfo9ycXokBAp 8e4735dYD+5xsKgfIPFCSAP5L0Sy7wVw91mN3HP32iqYVvn8TRzwYO349E7VxPCHCZ GYHna4FWvEepQ== From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Lukasz Luba , Daniel Lezcano Subject: [PATCH v1] thermal: core: Relocate the struct thermal_governor definition Date: Thu, 04 Apr 2024 21:27:07 +0200 Message-ID: <2725268.mvXUDI8C0e@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgudefkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeffffffkefgheehffelteeiveeffeevhfelteejvddvieejjeelvdeiheeuveeuffenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=4 Fuz1=4 Fuz2=4 From: Rafael J. Wysocki Notice that struct thermal_governor is only used by the thermal core and so move its definition to thermal_core.h. No functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/thermal/thermal_core.h | 25 +++++++++++++++++++++++++ include/linux/thermal.h | 25 ------------------------- 2 files changed, 25 insertions(+), 25 deletions(-) Index: linux-pm/drivers/thermal/thermal_core.h =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.h +++ linux-pm/drivers/thermal/thermal_core.h @@ -23,6 +23,31 @@ struct thermal_trip_desc { }; /** + * 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 + * @update_tz: callback called when thermal zone internals have changed, e.g. + * thermal cooling instance was added/removed + * @governor_list: node in thermal_governor_list (in thermal_core.c) + */ +struct thermal_governor { + const char *name; + 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, + const struct thermal_trip *trip); + void (*update_tz)(struct thermal_zone_device *tz, + enum thermal_notify_event reason); + struct list_head governor_list; +}; + +/** * struct thermal_zone_device - structure for a thermal zone * @id: unique id number for each thermal zone * @type: the thermal zone device type Index: linux-pm/include/linux/thermal.h =================================================================== --- linux-pm.orig/include/linux/thermal.h +++ linux-pm/include/linux/thermal.h @@ -126,31 +126,6 @@ struct thermal_cooling_device { #endif }; -/** - * 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 - * @update_tz: callback called when thermal zone internals have changed, e.g. - * thermal cooling instance was added/removed - * @governor_list: node in thermal_governor_list (in thermal_core.c) - */ -struct thermal_governor { - const char *name; - 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, - const struct thermal_trip *trip); - void (*update_tz)(struct thermal_zone_device *tz, - enum thermal_notify_event reason); - struct list_head governor_list; -}; - /* Structure to define Thermal Zone parameters */ struct thermal_zone_params { const char *governor_name;