Loading
spi: microchip-core: use min() instead of min_t()
min_t(int, a, b) casts an 'unsigned int' to 'int'. This might lead to the cases when big number is wrongly chosen. On the other hand, the SPI transfer length is unsigned and driver uses signed type for an unknown reason. Change the type of the transfer length to be unsigned and convert use min() instead of min_t(). Signed-off-by:Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
David Laight <david.laight.linux@gmail.com> Reviewed-by:
Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com> Link: https://patch.msgid.link/20251126075558.2035012-2-andriy.shevchenko@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org>