Commit 282152fa authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230528195830.164669-2-lars@metafoo.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5363073d
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment