On Mon, Feb 05, 2024 at 07:15:17PM +0200, Imre Deak wrote: > On Mon, Feb 05, 2024 at 06:13:30PM +0200, Ville Syrjälä wrote: > > On Wed, Jan 31, 2024 at 08:49:16PM +0200, Imre Deak wrote: > > > On Wed, Jan 31, 2024 at 06:09:04PM +0200, Ville Syrjälä wrote: > > > > On Tue, Jan 23, 2024 at 12:28:33PM +0200, Imre Deak wrote: > > > > > +static void untrack_tunnel_ref(struct drm_dp_tunnel *tunnel, > > > > > + struct ref_tracker **tracker) > > > > > +{ > > > > > + ref_tracker_free(&tunnel->group->mgr->ref_tracker, > > > > > + tracker); > > > > > +} > > > > > + > > > > > +struct drm_dp_tunnel * > > > > > +drm_dp_tunnel_get_untracked(struct drm_dp_tunnel *tunnel) > > > > > +{ > > > > > + track_tunnel_ref(tunnel, NULL); > > > > > + > > > > > + return tunnel_get(tunnel); > > > > > +} > > > > > +EXPORT_SYMBOL(drm_dp_tunnel_get_untracked); > > > > > > > > Why do these exist? > > > > > > They implement drm_dp_tunnel_get()/put() if > > > CONFIG_DRM_DISPLAY_DEBUG_DP_TUNNEL_STATE=n. > > > > Why does that kind of irrelevant detail need to be visible > > in the exported api? > > In non-debug builds the ref_tracker object isn't needed and so > drm_dp_tunnel_ref won't contain a pointer to it either. Since it's just a pointer I don't see much point in making things more complicated by leaving it out. > drm_dp_tunnel_get/put_untracked() provide a way to get/put a tunnel > reference without having to pass a ref_tracker pointer. > > > > > -- > > Ville Syrjälä > > Intel -- Ville Syrjälä Intel