Re: [PATCH v9 01/13] rust: hrtimer: introduce hrtimer support
From: Tamir Duberstein
Date: Wed Feb 26 2025 - 10:37:13 EST
On Wed, Feb 26, 2025 at 6:48 AM Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>
> "Tamir Duberstein" <tamird@xxxxxxxxx> 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.