Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp883818rdb; Fri, 22 Dec 2023 07:48:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IH87f8ybqLsUrqpMhkqYPueNenDsDqPEj42saWZk9vS/apEKuRgloKI1lEWejYbysSmXeUQ X-Received: by 2002:a05:6e02:9:b0:35d:a0c8:5d85 with SMTP id bb9-20020a056e02000900b0035da0c85d85mr2129645ilb.5.1703260106241; Fri, 22 Dec 2023 07:48:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703260106; cv=none; d=google.com; s=arc-20160816; b=QWb/DC8Ex8OrAZYrNpc4mZeIh2IUBSMv54yrUcmVBOrWE8YHv+6TYluGQlig+ZIp75 1YQXoJiJ+HKhI6px/9pqCDhOCS5yEs7cQoOSBn8BMO2f370pOdgAIXso0Etr/1HQ0lQI 0iyr/jmdxepI2fLpVKRWYvj9dDizr+cnalrYfvJPFaY1bodpPOb8Tf+OyKs07/VN/S6W GNeVp/NcJ+pxL7SZ11F8eMV29TJ5Y1Iw6p9alPydisLH/OM4w1ewsIT6A9k46/K7jj+A uxMZAbB/QNCZxW5y6f0kyGy80ZT+GKJt1lgZfkBc2Hzaw7Gbl1fPdU1eIQHHU2A6DxoD KyTg== ARC-Message-Signature: i=1; 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=4gYeD2yzGZwwurwvl8ayZlyc/Lt3sLmhRH2Kr42uCCE=; fh=lasocqyH+smjn/JDqQmsle5z/7Yg0jXhqkym87rl84w=; b=bafK9SX7QWHdk/aaJ5/aYHP/4f14HFUHZjtJSaCXpphgB8FCyipHWEsfVaXJ69qciH L/zTuoBmac45rspZRIQ/ITQgwPnNMSDDg27AOf7OY8HD/Uh0X64+rLLU4NlXH9CGX4/g ytj9UAbMdia0nQoULlVu6LprJuR+kIQBojQZnYdUiV1KN7h8taQ61mSnkIv2fChHsTHU pElne0ba5SYunHvbWFl6tn0eZUILkBAgWx+D8iU9f24D0xvOgvj/9yVzqR9i2Cgn8tS1 6GpA71CCnYkYy0++bZNhpOTvuiM9zA6KFXlCl0Vmb1RV/cN/Lev3DOj6cRJKw2hxMKkO Rlww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9853-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i24-20020a635418000000b005cdde8544ffsi3411012pgb.326.2023.12.22.07.48.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 07:48:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9853-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DC45F284FD7 for ; Fri, 22 Dec 2023 15:48:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28B6D241E3; Fri, 22 Dec 2023 15:48:19 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (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 7FAD723753; Fri, 22 Dec 2023 15:48:17 +0000 (UTC) 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-ot1-f50.google.com with SMTP id 46e09a7af769-6dbb09061c0so352745a34.0; Fri, 22 Dec 2023 07:48:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703260096; x=1703864896; 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=4gYeD2yzGZwwurwvl8ayZlyc/Lt3sLmhRH2Kr42uCCE=; b=HBF8awl4dU14fkzmLaUuvqJJ9hk29nWIK0pcnN0RWnqPdPEadTUPrC+ykLLlBXh08t FiJ3RIJD5ECbvxwoshLomgnLB4pRUB45FZjpIkZ5Ko03agxBH6Lq99lol8YdXJJ+nJ9O njx3vPzeUxdQalqGp9SdGFyaHAPvEBWs5wTVRHSAaCaqv9VRLYefTaKPPR/fH5yV0mU5 8pejvym7fHlMpN+vGzhun+4+YdEhcgSvvn/H6u+lJjuBcnpUlbsy6LbC1H3dK5FTP6d0 di8umzgRAUTLsrGs05e4Cs9tWiU85MQaIutb3Yo8F7E3BdeiM6K4dzKOHBCIWAC1oJEt YepQ== X-Gm-Message-State: AOJu0Yx9ynTEDx9XrlmrT6Kk7PPfoFcbyOCKd1t5xiVkNjKZKXQkV1WG o4KgndSPAxoj+7NilpT0ciNGB4FxgKNZL2Go5uYT7jVC X-Received: by 2002:a4a:dcd1:0:b0:591:4861:6b02 with SMTP id h17-20020a4adcd1000000b0059148616b02mr2840210oou.1.1703260096485; Fri, 22 Dec 2023 07:48:16 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231219092539.3655172-1-daniel.lezcano@linaro.org> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 22 Dec 2023 16:48:05 +0100 Message-ID: Subject: Re: [PATCH v3 1/2] thermal/debugfs: Add thermal cooling device debugfs information To: Daniel Lezcano Cc: "Rafael J. Wysocki" , rjw@rjwysocki.net, lukasz.luba@arm.com, rui.zhang@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 22, 2023 at 4:03=E2=80=AFPM Daniel Lezcano wrote: > > On 21/12/2023 18:19, Rafael J. Wysocki wrote: > > [ ... ] > > >> +struct cdev_value { > > > > I'm not sure about the name here. I would rather call it cdev_record, > > because it consists of two items, the id and the value. > > > >> + struct list_head node; > >> + int id; > >> + u64 value; > > > > This is kind of a union, but sort of in disguise. > > > > Why not make it a union proper, that is > > > > struct cdev_record { > > struct list_head node; > > int id; > > union { > > krime_t residency; /* for duration records */ > > u64 count; /* for occurrences records */ > > } data; > > }; > > > > which then would result in a bit cleaner code in some places below, if > > I'm not mistaken? > > Can we stick to > > struct cdev_record { > struct list_head node; > int id; > union { > u64 residency_ms; <----- ? > u64 count; > }; > }; > > ? > > The usage of the ktime_t will have a more important impact in the code. OK, but patch [2/2] uses ktime_t for duration computations regarding trip points. I'm not sure why this is different.