Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp546026lqp; Fri, 5 Apr 2024 01:16:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKsTZ/ELr0bTZKmpsU2fvM1j4fpDEaXjWyAjoJVcWv7egEOGUZLBoZX1bgYmAtE051ewdA61tjwqOorltyWgmg9SM6o5UtSWJmNKI8gw== X-Google-Smtp-Source: AGHT+IGB5FGqnt5X8QWbKmqCqje3oiHWHsQQQNyBr+DKw9g6Whx/6e+5CBkn4ukhnNq1hsy+Lxpt X-Received: by 2002:a05:622a:1908:b0:432:b30b:7fd7 with SMTP id w8-20020a05622a190800b00432b30b7fd7mr802951qtc.32.1712304995825; Fri, 05 Apr 2024 01:16:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712304995; cv=pass; d=google.com; s=arc-20160816; b=SpGXq2bhFJB7bm4pbeO76/DnP8s3MnDgBo39kcEFNUJCwZ8j3h11EUCqjaEqBYiBTS fCgEVzfwBY7jxckcZprELumcd7LUrNNjUVgDV3U+edPUzpdDe7N2jRbxp5Tlfzw71v2e iu5RiAmPGBhExA9o3eJ2AN19H7KJ8qiSAbVj4ZkYUtNHknNk5hotI//d8ZNnJNXyA5E/ TDVfw8TBzFtqmLLRrvEN6R/F358RIUsaI1JSYhGNCzGcmJQTFXK1vkAi3jx+HRH6QG7W 8O+eNj9JaqPvSa0wl8zCHG7RNgX3BgXTacnwzwPwVN2UcB60xrmRNZSD1OJWVWP0DL/A IdaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=yw86/8rl6thiJFG0DAIGvSY9o7xStsxNpTvvwqw3PX8=; fh=22oGAZ1Ogq/KP1hvbtQ7bVI0naSO4PC48f/0YrQMvL4=; b=zILBHYRfMBIUPa/q5dH6CUQ2b6Xu6CzO6YRkXJbAEDWlWGTv9sB9EkWEijcuT/z46u 3KFKZH5i3O+uGMkaN2OSl+6M22eESFL5R3LRhx5Bq2hRnVg0jPoCn6MWesanwItOiun2 T2/ZB0AS/FqSezKKQXRSaDfpAMwaJiOGlFU4PUR4eEGD2wKIUAr24Ei7ZGS2NbZaXRhy KP64HBUW/h2chKjnZ1N+FfQTA6wDrek8n0dBz5E00F0BQVaNE6Q001gYX/KhcgijWymq lPjrMyzLiJDR+BxIefC0uR7zaBCN2Zayoy7u/eloaBppiRt4BOqoN4Te+2zpPVM9PgAR gNsA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-132641-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132641-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ec11-20020a05622a5b8b00b004314e88b8edsi1150982qtb.415.2024.04.05.01.16.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 01:16:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132641-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-132641-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132641-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8C0801C209FC for ; Fri, 5 Apr 2024 08:16:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28AAD145FF4; Fri, 5 Apr 2024 08:16:29 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA5D9146002; Fri, 5 Apr 2024 08:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712304988; cv=none; b=CblBZ7SQd/bfkQCTLnRP5D7CRgaRqjaWoTljk2QcjbukmZdImBwXntbyTf11F2VOm4LaratGeV37+sqEVfbQ7Hnv50rlAFDuI0zMLdHoUJVQbpwdV4KGm0XcXhFVqkMbKAvYBu1y1NTnftJGHll39XeCANUfDX4pcCTAqnHdrqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712304988; c=relaxed/simple; bh=hMqL39LdAj1j1exJ+uwIa+In8yLPgOVIeLpi4Dxs8F8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Dm6N40fuCv8FbPel3oNDeqr2A9uPDNuKr4NidTpGXq83HKRaQfr4na+SQi3LzCd9Cdoetg9PNSU5izq/JfeL6fvdwJehSkL/80WIKxHmYlJkgmLEDRXmPU67ukFChgxmarqxjS6nwz8DrSM+it/HgiYUhdpbTKw0WZgAQx/0E7o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AA54FFEC; Fri, 5 Apr 2024 01:16:56 -0700 (PDT) Received: from [10.57.74.176] (unknown [10.57.74.176]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 67AA73F64C; Fri, 5 Apr 2024 01:16:25 -0700 (PDT) Message-ID: Date: Fri, 5 Apr 2024 09:16:26 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] thermal: core: Relocate the struct thermal_governor definition Content-Language: en-US To: "Rafael J. Wysocki" Cc: LKML , Daniel Lezcano , Linux PM References: <2725268.mvXUDI8C0e@kreacher> From: Lukasz Luba In-Reply-To: <2725268.mvXUDI8C0e@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/4/24 20:27, Rafael J. Wysocki wrote: > 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; > > > That makes perfectly sense IMO. We don't have drivers which come together with some custom governor just for them (like IIRC some devfreq more complex devices do/did). Lets close that open dimension. Reviewed-by: Lukasz Luba