devlink: use min_t to calculate data_size
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 28 Nov 2022 20:36:39 +0000 (12:36 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 1 Dec 2022 04:54:29 +0000 (20:54 -0800)
commit28e0c250f17ab3b6eb4dcee1a8208125bc77c61e
treef888563c3216e46a2eaf75ca5b99efe588399c1e
parentc1d8e3fb1a3bef6d1b24a9b1326e4ed11a1fbf0b
devlink: use min_t to calculate data_size

The calculation for the data_size in the devlink_nl_read_snapshot_fill
function uses an if statement that is better expressed using the min_t
macro.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/devlink.c