From: Lars-Peter Clausen Date: Sun, 28 May 2023 19:58:29 +0000 (-0700) Subject: spi: spi-sn-f-ospi: Use min_t instead of opencoding it X-Git-Tag: v6.6.7~2351^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=282152fa9d54a84a486b93a913934c21503fb5db;p=platform%2Fkernel%2Flinux-starfive.git spi: spi-sn-f-ospi: Use min_t instead of opencoding it Use `min_t` instead of `min` with casting the individual arguments. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230528195830.164669-2-lars@metafoo.de Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-sn-f-ospi.c b/drivers/spi/spi-sn-f-ospi.c index 39c4df5..691b609 100644 --- a/drivers/spi/spi-sn-f-ospi.c +++ b/drivers/spi/spi-sn-f-ospi.c @@ -566,7 +566,7 @@ static bool f_ospi_supports_op(struct spi_mem *mem, static int f_ospi_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op) { - op->data.nbytes = min((int)op->data.nbytes, (int)(OSPI_DAT_SIZE_MAX)); + op->data.nbytes = min_t(int, op->data.nbytes, OSPI_DAT_SIZE_MAX); return 0; }