Wed, Mar 25, 2026 at 07:26:52AM +0100, [email protected] wrote: >Unify access API to shared devlink priv data with normal devlink. > >Thanks to Jiri Pirko, we now have ability to create shared devlink >instances [1]. Introduction series have added usage of those for mlx, but >without priv data attached to the shared devlink. > >Current API makes it possible to access shared devlink instance's priv >data: > > void *devlink_shd_get_priv(struct devlink *devlink); > >but it is easy to forget (especially during rebase from "before shared >devlinks" era) and call: > > void *devlink_priv(struct devlink *devlink); > >which even has the same signature, so it's hard to catch the error. > >New proposed API unifies both calls into one, without any increase in the >observed struct size. (Alternative could be to store additional pointer, >set during devlink_alloc). > >Unexport the less convenient API call. > >[1] commit 411ad0605875 ("Merge branch >'devlink-introduce-shared-devlink-instance-for-pfs-on-same-chip'") >[1] https://lore.kernel.org/all/[email protected] > >Signed-off-by: Przemek Kitszel <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
