Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp967895rdb; Fri, 2 Feb 2024 09:14:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFipgJ9Q31iv5bl2zBSwIbPbbH8rGrC/KAKf9qTPQZC+xJBNcanJp3lT42GBA8Fks1gW8VV X-Received: by 2002:ad4:5caa:0:b0:68c:627f:ed53 with SMTP id q10-20020ad45caa000000b0068c627fed53mr7581529qvh.59.1706894054604; Fri, 02 Feb 2024 09:14:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706894054; cv=pass; d=google.com; s=arc-20160816; b=upnSEGdlwBk2EuQ5vrsRZ25KWKJ9CmYbgbomaLD8HKbpW5lROBVKhLj5iOgTe7GBfO lvVErBg6fTQvOFKrvvQhJklHahr8+eSnjW+pwRFKRgdpSFJx0D2AEjv2CtvxLwvnEe7N +MMK8tUT8zcZTNbXl5/qxWo2V8hXQAJerfmT+wuEoK+xni2Lrfyb79Xrauz8knjAcF2B zcHWMNEOoutTalPn2kUdJITMt/OniBex+6pHM0x/g1419/2KJqcCENtSTjsiioYMy6us w0N6CdW27d8CRQwDanYBzuTAQcZblqOBNt+OMvAu44TH3aAdTl4E4CwoNOzuXY9UVIAq lxdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=tui4ONM6FO3m81h+gr+b8rlOuprFlUgn1iNa4A24rug=; fh=yYTB25qBjfyfH6XP1H2H4K40frN2su7nroJ85IuGpLU=; b=c8+HvDs/OQohSVCELUvzerQaLovbEz+j09pbx1LyzZV/6OyOBWkaXSK0gB4z0HUcP1 BJXJBkikuPbSIihmo1VPGqIK+amXcrqiocButHl5fRH7Z3N4PEyjtNItFO0Yoi6hLJRE bA89hcF830h2doKr5vetogsqJq6OprbqwYmfVNBoKU2OBlaTbdPIBWihpczhAYPkXoS/ 5oVuWnt3iEWUd655aSNmAZLlUd31XMGO+25ItDFiwW125DvrANaHo30XMwenTsuTzsAZ JRFAlbjFFQGyU9WSgfB1kcBB78GIRwH3pt45F2vZfhrGst1bmmGCkjfrFzbbErb+Slfr 9ZjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-50222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50222-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVAS8X6BkfxHro+U0Ux6UymhuQcSWdXgDuGCf84feS7wGZYjPj4qnM9PPlKnNDPgmL3g1YC3dA1HSWww9MJau2bzvXDlxbXyqfGhR2YaQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n8-20020a0ce948000000b0068c78db0ea4si2295427qvo.609.2024.02.02.09.14.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 09:14:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50222-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=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-50222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50222-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 49E4D1C24F57 for ; Fri, 2 Feb 2024 17:14:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8D8014A4D9; Fri, 2 Feb 2024 17:13:55 +0000 (UTC) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E95BF7E0E5; Fri, 2 Feb 2024 17:13:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706894035; cv=none; b=s8+0izKH3SfPnkaTnI7AREI94M9dV4F9IAosaS2xuRk8QthBJ6iEB/qHHQW+YuZVjh/LBys+L/+0iTN8FxoJYHV9KbXTfeho8GdxE2CqvsAtTLlIjiYaKNYVwtxkJMCEzqcZY9PBXyV5IIiUtdPDPKclSNk5t5IzzRLsvFET9bU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706894035; c=relaxed/simple; bh=lElrpzwWJ9AuDSU49aGfPnpNn4ZjuzEqbifxayOHxU4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Eb9B1zMOB/wan6nHnoai2paWh7+KlYx3eESlvjUG81amC/Zq1dSJ9uHUU5Xcw2AJ90SCvYxyaa/n18fZBEc9IzjLgrpP4sCyjHeM5brVvgxSBBqsr13RhXN3VKCfo/OjcWS9uPTNWEqdFkK5Jt0sLHgFhMt/bQnRGS05721JSj4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.167.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3bfc3c3edf9so137282b6e.0; Fri, 02 Feb 2024 09:13:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706894033; x=1707498833; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tui4ONM6FO3m81h+gr+b8rlOuprFlUgn1iNa4A24rug=; b=htndbv4dW5aqztWhiCgq7zLlgT4wlqqYSxsNdzLuQYmldbAQqU8T9tK4gbSYCcbTFT 4IPXvG+O7rAqbXR/kxJg8lXu/5pCohv0ZUhIfO6SWUIQGFf/8buEfLkXYRw9X8DOhnVb Dza7Dr+A76BJhwCUWkdPfYTsRgoC796kng/Mwink6XjpIuPF+tPfgKzJPitRYvDI7x30 iUOp/agJybGeKZAV51zbnp7oYg1DMxF7piTYL+nm2+H/DCQio7PbC2eY9lhO21eJNUwT agTKhALb1/bRGaUMlfijuEDgQK3O39edq871bxaWR2ToLktZDOgyXXzhXFw73/K9kCxW kfVQ== X-Forwarded-Encrypted: i=0; AJvYcCXEAFgLIg2ackZti+ZZ2gJqpHEJ+DuIyMCSLuJLwb4y2XNHYeSnbJTLY5ldnpImOU9mt/FClTK5W5st55nZatAffxrXxpSsVP0lpZzLjfeoMLXutx0hOHrCWy8psJJWaw//WIoYHTZFZXrrXUhcu56Iffqa93+HY9tV6N6S6UIDnxhlkspcBIaPhfRBJrNUbM0WCNvd/7azNauurv9lOr1rMV1Ytn/VP3A= X-Gm-Message-State: AOJu0Yygin2NlM5As1pZtYZpGBL36Bt1hwNI5ruhGvhBiZ8TeiFG/seF ywmTlkPndQCjmPilZ+xlSc4/k6MrcUmBuCyyvpz4MS/3i5Q/kNY+nihhBpTqFfS/v0c8miWawHo vyxrgOQ4b1UEQ3oer/e5eiMUwYxI= X-Received: by 2002:a05:6870:c79b:b0:219:2a72:1c6d with SMTP id dy27-20020a056870c79b00b002192a721c6dmr1276418oab.0.1706894032878; Fri, 02 Feb 2024 09:13:52 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240130111250.185718-1-angelogioacchino.delregno@collabora.com> <20240130111250.185718-3-angelogioacchino.delregno@collabora.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 2 Feb 2024 18:13:41 +0100 Message-ID: Subject: Re: [PATCH v1 02/18] thermal: Add new structures and thermal_zone_device_register() To: Dan Carpenter Cc: "Rafael J. Wysocki" , AngeloGioacchino Del Regno , daniel.lezcano@linaro.org, miquel.raynal@bootlin.com, rui.zhang@intel.com, lukasz.luba@arm.com, support.opensource@diasemi.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, andersson@kernel.org, konrad.dybcio@linaro.org, amitk@kernel.org, thara.gopinath@gmail.com, niklas.soderlund@ragnatech.se, srinivas.pandruvada@linux.intel.com, baolin.wang@linux.alibaba.com, u.kleine-koenig@pengutronix.de, hayashi.kunihiko@socionext.com, d-gole@ti.com, linus.walleij@linaro.org, DLG-Adam.Ward.opensource@dm.renesas.com, error27@gmail.com, heiko@sntech.de, hdegoede@redhat.com, jernej.skrabec@gmail.com, f.fainelli@gmail.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, kernel@collabora.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 2, 2024 at 9:47=E2=80=AFAM Dan Carpenter wrote: > > On Thu, Feb 01, 2024 at 08:24:15PM +0100, Rafael J. Wysocki wrote: > > On Tue, Jan 30, 2024 at 12:13=E2=80=AFPM AngeloGioacchino Del Regno > > > diff --git a/include/linux/thermal.h b/include/linux/thermal.h > > > index 65d8f92a9a0d..7a540b746703 100644 > > > --- a/include/linux/thermal.h > > > +++ b/include/linux/thermal.h > > > @@ -149,7 +149,8 @@ struct thermal_cooling_device { > > > passive trip point. > > > * @need_update: if equals 1, thermal_zone_device_update needs= to be invoked. > > > * @ops: operations this &thermal_zone_device supports > > > - * @tzp: thermal zone parameters > > > + * @tzp: Thermal zone parameters > > > + * @tgp: Thermal zone governor parameters > > > * @governor: pointer to the governor for this thermal zone > > > * @governor_data: private pointer for governor data > > > * @thermal_instances: list of &struct thermal_instance of this ther= mal zone > > > @@ -184,7 +185,8 @@ struct thermal_zone_device { > > > int prev_high_trip; > > > atomic_t need_update; > > > struct thermal_zone_device_ops *ops; > > > - struct thermal_zone_params *tzp; > > > + struct thermal_zone_platform_params *tzp; > > > + struct thermal_governor_params *tgp; > > > > I agree with doing a split here, but I'm not sure about moving items > > from the arg list to struct thermal_zone_platform_params (as mentioned > > above). > > > > Also the naming is quite inconsistent. IMO it would be better to call > > the first pointer "tzpp", rename struct thermal_governor_params to > > struct thermal_zone_governor_params and call the second pointer > > "tzgp". > > > > The names "tzgp" and "tzpp" look almost identical at first glance. > Could we increase the hamming distance somehow? Good point. They may as well be gov_params and platform_params AFAIAC.