aboutsummaryrefslogtreecommitdiffstats
path: root/net/devlink/resource.c
Commit message (Collapse)AuthorAgeFilesLines
* devlink: remove unused devlink_resource_register()Przemek Kitszel2024-10-291-33/+0
| | | | | | | | | | | | Remove unused devlink_resource_register(); all the drivers use devl_resource_register() variant instead. Reviewed-by: Wojciech Drewek <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Reviewed-by: Joe Damato <[email protected]> Signed-off-by: Przemek Kitszel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
* devlink: remove unused devlink_resource_occ_get_register() and _unregister()Przemek Kitszel2024-10-291-39/+0
| | | | | | | | | | | | | Remove not used devlink_resource_occ_get_register() and devlink_resource_occ_get_unregister() functions; current devlink resource users are fine with devl_ variants of the two. Reviewed-by: Wojciech Drewek <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Reviewed-by: Joe Damato <[email protected]> Signed-off-by: Przemek Kitszel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
* devlink: devl_resource_register(): differentiate error codesPrzemek Kitszel2024-10-291-1/+1
| | | | | | | | | | | | | | Differentiate error codes of devl_resource_register(). Replace one of -EINVAL exit paths by -EEXIST. This should aid developers introducing new resources and registering them in the wrong order. Reviewed-by: Wojciech Drewek <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Reviewed-by: Joe Damato <[email protected]> Signed-off-by: Przemek Kitszel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
* devlink: use devlink_nl_put_u64() helperPrzemek Kitszel2024-10-291-15/+12
| | | | | | | | | | | Use devlink_nl_put_u64() shortcut added by prev commit on all devlink/. Reviewed-by: Wojciech Drewek <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Reviewed-by: Joe Damato <[email protected]> Signed-off-by: Przemek Kitszel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
* devlink: rename netlink callback to be aligned with the generated onesJiri Pirko2023-10-231-2/+2
| | | | | | | | | | | All remaining doit and dumpit netlink callback functions are going to be used by generated split ops. They expect certain name format. Rename the callback to be aligned with generated names. Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
* devlink: push resource related code into separate fileJiri Pirko2023-08-281-0/+579
Cut out another chunk from leftover.c and put resource related code into a separate file. Signed-off-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>