diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2025-05-16 15:32:09 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-05-19 11:55:23 +0100 |
commit | b4eec5cdf112e3a4e286fb79fe507b09e2fca66f (patch) | |
tree | 19a5231d69c84f5376b3b5e250fc772feefa9939 | |
parent | 3dd5ed19a2e8283f9ead5f2fd09b267a337ab86d (diff) |
spi: sh-msiof: Make words/bits unsigned in sh_msiof_spi_txrx_once()
Make the words and bits parameters of sh_msiof_spi_txrx_once() unsigned,
as that matches what is passed by the caller.
This allows us to replace min_t() by the safer min().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/30eff1052642a4bcb0f1bc4bed7aae25d355a7dc.1747401908.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-sh-msiof.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 11ef5c0a498d..fdb13dbc1752 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c @@ -677,16 +677,16 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p, void (*rx_fifo)(struct sh_msiof_spi_priv *, void *, int, int), const void *tx_buf, void *rx_buf, - int words, int bits) + unsigned int words, unsigned int bits) { int fifo_shift; int ret; /* limit maximum word transfer to rx/tx fifo size */ if (tx_buf) - words = min_t(int, words, p->tx_fifo_size); + words = min(words, p->tx_fifo_size); if (rx_buf) - words = min_t(int, words, p->rx_fifo_size); + words = min(words, p->rx_fifo_size); /* the fifo contents need shifting */ fifo_shift = 32 - bits; |