Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp860085rdb; Fri, 22 Dec 2023 07:12:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0F7fJGj8l1DQFtFJAWngDgUcoBEf9Cvv+WXB42F/671V+bTd6bKufKAE7zW9Zp9xyirDu X-Received: by 2002:a05:651c:1076:b0:2cc:a647:c4 with SMTP id y22-20020a05651c107600b002cca64700c4mr615574ljm.9.1703257925144; Fri, 22 Dec 2023 07:12:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703257925; cv=none; d=google.com; s=arc-20160816; b=aqfzXSbxOl+j/VEKQZqqB1/Jkj6qwfmXAGpV2aaFCdo8Dn2z9zMutSi4OCktV1gnje vMuHqHQlZfAItzStXIJCWCwDUoctagiiFq9v65J/KsY2VcCqXAY5eqarsb8IfXD8H9h0 dWXmqvHQ9P2oVyQZ0fXoKgewqVyQdsjcozUgjFwyU1TFkpisxyohcIi47MGCk+PgmoNK bDuubvAS0h/zkAJaDMSB/CBRMY4u2311hz05rPwLpefj8WHZl5vxxIT7vb1Y/G99CRmB GZdCpeqvaELuWY5QRd61S3y0I4iSpkEx6y2UD0Chp5Hf1d3jNj6Biem0psbtBDaLpzlc b5fg== ARC-Message-Signature: i=1; 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:dkim-signature; bh=AKSO9lLlrTdc5RcHnsdSDuaWJoa08Ko0rq0BxR4nKbI=; fh=UekkbB4LTWOAjXIpYdgQEcGSZ9BABUjlRS+mK+eiC+E=; b=xLnEgURDfyHBJ4v+BVgU8jAEHv3zwk44l6HGS6+uHgim0BJ0Si4euTj5n/plC7O+jE y3dFY3/kgu2QzpcjPP7pA7T3FqL80lZCExLg1JksS4Q6zgfMukuIHNK4TRjk2xnIZjOy Ssc+PTl1YR6bIrE7Gpc+GFrN3YEtVXkr6l2PqrUrNaaTFP61LVMpcCx4UgJ0Jdndl2BT WUKjkH5hcUhUlnpt+2n2CBpz74WbfBEyscYTUPRARtNDdhmF7aUh9J36sOf79/amVtpI 9/XSG5mKLFIi+MoS2g3BdKZ5vy4TTnKNZaBZmpd6KVCD+i3zNXHiS1bvOnzYUJ6fbnla nc4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZL59rTyJ; spf=pass (google.com: domain of linux-kernel+bounces-9808-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9808-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id eh19-20020a0564020f9300b0054cc8d2c0d9si1880985edb.565.2023.12.22.07.12.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 07:12:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9808-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZL59rTyJ; spf=pass (google.com: domain of linux-kernel+bounces-9808-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9808-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 23A551F279AB for ; Fri, 22 Dec 2023 15:04:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC55323755; Fri, 22 Dec 2023 15:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZL59rTyJ" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 9F5FF23745 for ; Fri, 22 Dec 2023 15:03:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-40c41b43e1eso23237385e9.1 for ; Fri, 22 Dec 2023 07:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703257423; x=1703862223; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=AKSO9lLlrTdc5RcHnsdSDuaWJoa08Ko0rq0BxR4nKbI=; b=ZL59rTyJNs7DZWr2y91c/xBDledKfVPi3/f3hT1HH5GIxkyC/aAXsLgcQ0ZAAcNse1 9wBkv7QoCfHgiXIliw7aHSYOMWYY8Az2yX0X0f6OgYa3TNx33jMewp6q8+cmDneaaPgz pCQ4yRGTKNysYQzK7XhcEgl9CYWSwvs1mmfisw56OXoYfhnum4IrbolY4cSLGjtZJ1vI Bj1EU0QBxg5qrtPTE7d/yNFISQd94gTUrEyySDRKj2tDk15T+/gfOsA2hUgahMx9dR6o Jfg+zXo0/lRi2ytOXEY+DP79piMz+oTyF7ktBbDU+34v3cThRmlyJLWWRW/0CfjdS7no YD1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703257423; x=1703862223; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AKSO9lLlrTdc5RcHnsdSDuaWJoa08Ko0rq0BxR4nKbI=; b=WahtDCgmh8qI8H8VWppjT+s/Gfb3PyGtGekWDqKSjO+G0brzaSehNdpULfvum7o8Eq AZwo7IOO78humxM4AzJnLQ+3YOCMupi+LvoSgOzLT9ndmm6BRDrekuATiMlZ2mcSqZH3 qbpUMF8KnEH2iOuvXwrL235JEQShVQEJj/4wDcDLTfqhDXCK8yy4ctP96ABMkJkGGamt pQeSfDTczqJ3VFxWlBd6i5PmhEIuKlbie4WvAEwpvaI9PcOL8jatXMAQk282G2TkNu1T fvvv67Hcf0s/T1FqO1XfvK1NoNfqtOHycckXJs/DuTr0qGn0E+Cu2WftAYnF6BQlwLWW IIPQ== X-Gm-Message-State: AOJu0YyMbmJoxLSmjm60uWC0gEArrW+99UKdI/GcfNmXruqwGF7/abns JkN2vHiyd2rAWQju6Pqe5FWaTHW2JEzNMtpBSq5UBZuvLXE= X-Received: by 2002:a05:600c:4453:b0:40d:2921:2a5d with SMTP id v19-20020a05600c445300b0040d29212a5dmr777818wmn.211.1703257422837; Fri, 22 Dec 2023 07:03:42 -0800 (PST) Received: from [192.168.10.46] ([78.240.110.132]) by smtp.googlemail.com with ESMTPSA id b2-20020a5d4b82000000b003367ff4aadasm4479292wrt.31.2023.12.22.07.03.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Dec 2023 07:03:42 -0800 (PST) Message-ID: Date: Fri, 22 Dec 2023 16:03:41 +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 v3 1/2] thermal/debugfs: Add thermal cooling device debugfs information Content-Language: en-US To: "Rafael J. Wysocki" Cc: rjw@rjwysocki.net, lukasz.luba@arm.com, rui.zhang@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20231219092539.3655172-1-daniel.lezcano@linaro.org> From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog