From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: rjw@rjwysocki.net, lukasz.luba@arm.com, rui.zhang@intel.com,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v3 1/2] thermal/debugfs: Add thermal cooling device debugfs information
Date: Fri, 22 Dec 2023 16:03:41 +0100 [thread overview]
Message-ID: <fa8628c7-f49a-4226-b26e-ada31316b130@linaro.org> (raw)
In-Reply-To: <CAJZ5v0j+F2uLauRqGZ1nvX3CsoA3+JXyzXFp5VtzvVTQTg6Yvw@mail.gmail.com>
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.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2023-12-22 15:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 9:25 Daniel Lezcano
2023-12-19 9:25 ` [PATCH v3 2/2] thermal/debugfs: Add thermal debugfs information for mitigation episodes Daniel Lezcano
2023-12-21 19:26 ` Rafael J. Wysocki
2023-12-23 11:41 ` Daniel Lezcano
2023-12-27 19:53 ` Rafael J. Wysocki
2023-12-21 17:19 ` [PATCH v3 1/2] thermal/debugfs: Add thermal cooling device debugfs information Rafael J. Wysocki
2023-12-22 15:03 ` Daniel Lezcano [this message]
2023-12-22 15:48 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa8628c7-f49a-4226-b26e-ada31316b130@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®