diff options
author | Lars-Peter Clausen <[email protected]> | 2023-05-28 12:58:29 -0700 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-05-30 13:47:02 +0100 |
commit | 282152fa9d54a84a486b93a913934c21503fb5db (patch) | |
tree | 6d1062e3e3e26bb74e385443cc6425a156dcec3c | |
parent | 5363073dfcf087393c0587e9217ef50b1d63fcce (diff) |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
-rw-r--r-- | drivers/spi/spi-sn-f-ospi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-sn-f-ospi.c b/drivers/spi/spi-sn-f-ospi.c index 39c4df54cdb8..691b6092fb3f 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; } |