[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87a59x5hr3.fsf@kernel.org>
Date: Fri, 07 Mar 2025 10:09:52 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Tamir Duberstein" <tamird@...il.com>
Cc: "Miguel Ojeda" <ojeda@...nel.org>, "Anna-Maria Behnsen"
<anna-maria@...utronix.de>, "Frederic Weisbecker" <frederic@...nel.org>,
"Thomas Gleixner" <tglx@...utronix.de>, "Danilo Krummrich"
<dakr@...nel.org>, "Alex Gaynor" <alex.gaynor@...il.com>, "Boqun Feng"
<boqun.feng@...il.com>, "Gary Guo" <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Benno Lossin" <benno.lossin@...ton.me>,
"Alice Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>,
"Lyude Paul" <lyude@...hat.com>, "Guangbo Cui" <2407018371@...com>,
"Dirk Behme" <dirk.behme@...il.com>, "Daniel Almeida"
<daniel.almeida@...labora.com>, <rust-for-linux@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v9 01/13] rust: hrtimer: introduce hrtimer support
"Tamir Duberstein" <tamird@...il.com> writes:
> On Wed, Feb 26, 2025 at 6:48 AM Andreas Hindborg <a.hindborg@...nel.org> wrote:
>>
>> "Tamir Duberstein" <tamird@...il.com> writes:
>>
>> > Sorry, I meant HasHrTimer and HrTimerPointer rather than HrTimer and
>> > HrTimerPointer.
>>
>> `HasHrTimer` is named so because it is meant to be implemented by types
>> that contain a field of type `HrTimer`.
>>
>> `HrTimerPointer` is meant to be implemented by pointer types that point
>> to types that implement `HasHrTimer`.
>>
>> They are different, and the naming reflect that.
>>
>> I will not rename `HasHrTimer` to `ContainsHrTimer`, because the rest of
>> the rust kernel uses the `HasFoo` naming scheme.
>
> The Has prefix makes sense in HasHrTimer. Shouldn't the name
> HrTimerPointer also contain "Has"? HasHrTimerPointer would be
> confusing, but perhaps PointerToHasHrTimer? It's a mouthful to be
> sure.
I get your point, but I really think that `HasHrTimer` and
`HrTimerPointer` is pretty good. Names _can_ get too long.
Best regards,
Andreas Hindborg
Powered by blists - more mailing lists