Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp400975rdb; Thu, 1 Feb 2024 11:43:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8IcxdqspcF5sMn66K55htK+KMMTvVHbK2EJxXYCA41bkRkD3d69nkDdaBR5AdGNE0Xar5 X-Received: by 2002:a2e:a401:0:b0:2d0:5435:7b11 with SMTP id p1-20020a2ea401000000b002d054357b11mr3831921ljn.52.1706816597964; Thu, 01 Feb 2024 11:43:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706816597; cv=pass; d=google.com; s=arc-20160816; b=rJIOZ80fo++SyXigK8Nv7E1U/TIQoq3e5NNUUGlU04hOmASZ6z0qaWk+qHUAvDqSRu TlTi/JcUGk4GlgYGxI98Cz4HNWPm4yahNE+DrWAw6QEP3BRJfWm3Y+ZyyohfKjL9fYmq Lpm7VDrzCGlNa+90qjtfAlgWwl+HuEI1JZt4iRkgkyUCFxfEvbjev6PQQP4vYRGiyRyY kZHgLQodTB9UvJLYjVUIRuw9yUAxuv4u9sxlG0yngCH/05n3aqC7R88YurUgJhZcmvIN rP/cSeRWgr+SVcUI+vQMUdzUr1MABdy1zWYuG2vQ8qSPIVgh/7NekwD6uEuOIm5OcMmT eIQQ== 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=KIfIQzx9YZcK7zdFdUNXFqLOVj9oiILciX2Jy5KyqR0=; fh=2UC97pSq0PlkmGn+WscTbbjwoIX+6BZT4NDCcO+Iolo=; b=pCjS1soJ4cTOd5pqxFx4dYFpDss2KbZf+5AzNf4lLLU8ncfmsfVVqkgGYA59T52FGc xt0M6/oo8ouLdToG1m3SucJuyRyrZzLpnb8G94gnZdmjUO9QypmvTxA/303iUSNrv2JO 5dEuc8HUacWAlK9ODRzQiag16RaGS6iQNKI1BxgctnWioL3UDP/sNIzTDfZs2+QiAGe9 PHEwIq4N9njy4zqyg5FlekHToEOg/Wbpit7j7LeN3qfNVh6PyEkoWsTe4+NntUbkkhyt hNZiH7ybssEymtvvyKRnN7eSazKAgFfzRHR4ClqH/PqxHr8U/2q8AjbZp1qJtmPXRRUU wDhw==; 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-48781-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48781-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; AJvYcCX745mb8uu+OVomU4SWh3LfYOL+YfIHq2gCx0Y9kp/CK5zK92xLSfpQjAphhrr4UiIH7zfdhwOFI99Uu+WOtyXI0ooh9n0tJ/JzMty6Qw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a5-20020a05640233c500b0055f1087e1d3si104027edc.443.2024.02.01.11.43.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 11:43:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48781-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-48781-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48781-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 am.mirrors.kernel.org (Postfix) with ESMTPS id ACB781F27EBF for ; Thu, 1 Feb 2024 19:43:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B114485620; Thu, 1 Feb 2024 19:43:06 +0000 (UTC) Received: from mail-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.44]) (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 C7423652; Thu, 1 Feb 2024 19:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706816586; cv=none; b=JhXUyki/x7UFwkmX5Yj6pT0IgG494jynHjrod77U7T+u3/XNOM369rgzF5z+KlBIVcdAVJObMc2yVs77JddknB2eyMY1Z5wzXih3Tyv4X5T47B0owk//fi1Fb0VLuBWXThSipY+JS21AOhX9aexrqObuFhQcO+pPvKTnOxbWVoY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706816586; c=relaxed/simple; bh=EI6Wdf+UwkRuRvguDGNKbFCflnhm+lABsh5itXBFJ0o=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=fXVwb77tfE4BBpeNABQuVQTmxsQ/jfDsfWm+nl9YJSGjJs2sT+gLBHxXqRafnAKkzltv48p1x8uztA59lbWZ+mw5ZxoqYXC0GA+hkR1rp12Fx0Os8bl/HK5TTG94c+vRQJX1h9Z2Hk8U3W8LCyu+NtIPVLa0qKOle3vIuFAQ4YA= 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.161.44 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-oo1-f44.google.com with SMTP id 006d021491bc7-59a47232667so168837eaf.0; Thu, 01 Feb 2024 11:43:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706816584; x=1707421384; 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=KIfIQzx9YZcK7zdFdUNXFqLOVj9oiILciX2Jy5KyqR0=; b=qrNI+IlWTVOm13C4PZS1Mxsc8iDSGTr8A/PPAsfx0VJxqi1AsMCCxiccldj4Ymftr5 Bk2+n1G8zI/ior+6ezFY3Uw3SSr4ANwaciRrvlRX2XRudpic3XNw5TAHox+l5QLbLk6H pdovdpcM3QgFZuHdGGIhSWPeum8q5DwnJGR9r8uGwxPHKsM3/YtUAOteZsaUPeH/tOVg 3Nw0nx4DuVclG4GMjUacUXJJq3e+0dezbHjsmdrR0ohfQlYTLIW+PWUazTzq1WRggelz lhrzVaQRSiGvfosbq/0hvQbsfnO0aWjylKKRKWP30EzjhmyJzRHXp2/r4CeWPQH0jmKe 0w2Q== X-Forwarded-Encrypted: i=0; AJvYcCWHCP7KHzhWF2+3EGY9jQVybGWJiDM4PwdmQ/0/7bGQNRBsaugfJtQyB12E+BXiqWVY0lzsTmjS5ol6QOB6QGx9z+JH+S8VTfeAm9kMhVbv9cMuaurBke7ByJS6p7yOavfo/Fbi7zIPbG6YUUHJgS1n+y7kEBzGdfCWkrmmfzuuKTMFTA2qxdu8xZcOvvyVF8p4zjZ/Oek3rcDmzMy5GR6uONoSld5d9Sw= X-Gm-Message-State: AOJu0YwJgfYSa0RQt1Rk0+z0c41mcDTzyNkJz9i3mCaxhjdp2F5EaG67 gGWE5wl5Z3y+iPHfXHex5vxY/Wrgx6pcj0NcPCmpJR0N6xi7zxHUQ6rCJKYfrLbFc5uveIFtdkH OkR5VlrVKRWxR7ci5rgQPVt1bQ78= X-Received: by 2002:a05:6870:b6a4:b0:218:d1b7:e8cd with SMTP id cy36-20020a056870b6a400b00218d1b7e8cdmr4317354oab.3.1706816583711; Thu, 01 Feb 2024 11:43:03 -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-4-angelogioacchino.delregno@collabora.com> In-Reply-To: <20240130111250.185718-4-angelogioacchino.delregno@collabora.com> From: "Rafael J. Wysocki" Date: Thu, 1 Feb 2024 20:42:52 +0100 Message-ID: Subject: Re: [PATCH v1 03/18] thermal: Directly use thermal_zone_platform_params for thermal_zone_device To: AngeloGioacchino Del Regno Cc: daniel.lezcano@linaro.org, miquel.raynal@bootlin.com, rafael@kernel.org, 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, bchihi@baylibre.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 Tue, Jan 30, 2024 at 12:13=E2=80=AFPM AngeloGioacchino Del Regno wrote: > > Remove all duplicate members from thermal_zone_device and directly > use the corresponding ones from struct thermal_zone_platform_params. I totally disagree with this approach. It does make sense to store these things in a tz directly. 1. devdata allows the caller of the thermal zone to get to their own information on it conveniently. This patch makes it harder. 2. It makes sense to copy type into tz to allow the zone creator to free the string (should they want to do that). 3. It would make sense to copy the contents of the trips[] table to tz to allow the zone creator to free their initial table. This doesn't happen today, but it is in the works and your patch goes against this. 4. It makes sense to copy num_trips directly to tz, because it is closely related to trips[]. 5. It makes sense to copy ops directly into tz, because this will allow zone creators to use const ops for zone registration. Again, this doesn't happen today, but it is in the works and this patch goes against this. As far as I'm concerned, this one is a total no-go. Thanks!