Re: [RFC PATCH v2 08/22] devlink: prepare to support region operations

Jiri Pirko
2020-03-02T17:42:11Z

Sat, Feb 15, 2020 at 12:22:07AM CET, jacob.e.keller@intel.com wrote:
>Modify the devlink region code in preparation for adding new operations
>on regions.
>
>Create a devlink_region_ops structure, and move the name pointer from
>within the devlink_region structure into the ops structure (similar to
>the devlink_health_reporter_ops).
>
>This prepares the regions to enable support of additional operations in
>the future such as requesting snapshots, or accessing the region
>directly without a snapshot.
>
>In order to re-use the constant strings in the mlx4 driver their
>declaration must be changed to 'const char * const' to ensure the
>compiler realizes that both the data and the pointer cannot change.
>
>Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
>Reviewed-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Jiri Pirko <jiri@mellanox.com>