Skip to content

Commit 282152f

Browse files
larsclausenbroonie
authored andcommitted
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 <lars@metafoo.de> Link: https://lore.kernel.org/r/20230528195830.164669-2-lars@metafoo.de Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 5363073 commit 282152f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/spi/spi-sn-f-ospi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ static bool f_ospi_supports_op(struct spi_mem *mem,
566566

567567
static int f_ospi_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op)
568568
{
569-
op->data.nbytes = min((int)op->data.nbytes, (int)(OSPI_DAT_SIZE_MAX));
569+
op->data.nbytes = min_t(int, op->data.nbytes, OSPI_DAT_SIZE_MAX);
570570

571571
return 0;
572572
}

0 commit comments

Comments
 (0)