iio: core: Use min() instead of min_t() to make code more robust
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 21 Jul 2023 17:00:18 +0000 (20:00 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 23 Jul 2023 09:13:47 +0000 (10:13 +0100)
commitcb1d17535061ca295903f97f5cb0af9db719c02c
tree2b2287b958a30845ae849edd93f4d285cc6d375c
parent90c6241860bf804c95aec02ed296898459720a7c
iio: core: Use min() instead of min_t() to make code more robust

min() has strict type checking and preferred over min_t() for
unsigned types to avoid overflow. Here it's unclear why min_t()
was chosen since both variables are of the same type. In any
case update to use min().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230721170022.3461-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-core.c