diff options
author | Mark Brown <broonie@kernel.org> | 2022-03-17 20:59:22 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-03-17 20:59:22 +0300 |
commit | 2d2c73318bd51e430da6818c0d12973081aba8d2 (patch) | |
tree | fd7c029e9b341013e2da1092fed82844e5b6ff0b /drivers/spi | |
parent | c9839acfcbe20ce43d363c2a9d0772472d9921c0 (diff) | |
parent | 1a4e53d2fc4f68aa654ad96d13ad042e1a8e8a7d (diff) | |
download | linux-2d2c73318bd51e430da6818c0d12973081aba8d2.tar.xz |
spi: Get sgs size fix into branch
Dependency for patch to be applied.
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 6326e592fcfd..6937cf2d59e0 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1000,10 +1000,10 @@ int spi_map_buf(struct spi_controller *ctlr, struct device *dev, int i, ret; if (vmalloced_buf || kmap_buf) { - desc_len = min_t(int, max_seg_size, PAGE_SIZE); + desc_len = min_t(unsigned int, max_seg_size, PAGE_SIZE); sgs = DIV_ROUND_UP(len + offset_in_page(buf), desc_len); } else if (virt_addr_valid(buf)) { - desc_len = min_t(int, max_seg_size, ctlr->max_dma_len); + desc_len = min_t(unsigned int, max_seg_size, ctlr->max_dma_len); sgs = DIV_ROUND_UP(len, desc_len); } else { return -EINVAL; |