diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2016-02-17 15:42:28 -0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-17 19:17:10 +0000 |
commit | c8dab77a1f92095674e4d7fcb151cac4630e10f9 (patch) | |
tree | 7a885620fd52ee47c0cd2a99d98843f3c5d1d975 /drivers/spi | |
parent | 7d62f51e74c62afc79f63c70ae48f1b8de57f5d4 (diff) | |
download | linux-c8dab77a1f92095674e4d7fcb151cac4630e10f9.tar.gz linux-c8dab77a1f92095674e4d7fcb151cac4630e10f9.tar.bz2 linux-c8dab77a1f92095674e4d7fcb151cac4630e10f9.zip |
spi: core: Use min_t(size_t,..)
Use min_t(size_t,..) in order to avoid the following
build warning on ARM64:
include/linux/kernel.h:754:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^
drivers/spi/spi.c:2304:17: note: in expansion of macro 'min'
xfers[0].len = min(maxsize, xfer[0].len);
Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 9ae199db171b..390d9ee937b6 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2279,7 +2279,7 @@ static int __spi_split_transfer_maxsize(struct spi_master *master, /* the first transfer just needs the length modified, so we * run it outside the loop */ - xfers[0].len = min(maxsize, xfer[0].len); + xfers[0].len = min_t(size_t, maxsize, xfer[0].len); /* all the others need rx_buf/tx_buf also set */ for (i = 1, offset = maxsize; i < count; offset += maxsize, i++) { |