Skip to content

Commit 2d2c733

Browse files
committed
spi: Get sgs size fix into branch
Dependency for patch to be applied.
2 parents c9839ac + 1a4e53d commit 2d2c733

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/spi/spi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,10 +1000,10 @@ int spi_map_buf(struct spi_controller *ctlr, struct device *dev,
10001000
int i, ret;
10011001

10021002
if (vmalloced_buf || kmap_buf) {
1003-
desc_len = min_t(int, max_seg_size, PAGE_SIZE);
1003+
desc_len = min_t(unsigned int, max_seg_size, PAGE_SIZE);
10041004
sgs = DIV_ROUND_UP(len + offset_in_page(buf), desc_len);
10051005
} else if (virt_addr_valid(buf)) {
1006-
desc_len = min_t(int, max_seg_size, ctlr->max_dma_len);
1006+
desc_len = min_t(unsigned int, max_seg_size, ctlr->max_dma_len);
10071007
sgs = DIV_ROUND_UP(len, desc_len);
10081008
} else {
10091009
return -EINVAL;

0 commit comments

Comments
 (0)