aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/ccio-dma.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2022-03-14 19:14:29 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-03-14 19:14:29 -0700
commitce8356335027d3929fbfae4127451adaf36e1cd4 (patch)
tree8ac7d71d3b67a6138e811cd4d4e135d934233e47 /drivers/parisc/ccio-dma.c
parentInput: mt6779-keypad - fix signedness bug (diff)
parentLinux 5.17-rc8 (diff)
downloadlinux-dev-ce8356335027d3929fbfae4127451adaf36e1cd4.tar.xz
linux-dev-ce8356335027d3929fbfae4127451adaf36e1cd4.zip
Merge tag 'v5.17-rc8' into next
Sync up with mainline to again get the latest changes in HID subsystem.
Diffstat (limited to 'drivers/parisc/ccio-dma.c')
-rw-r--r--drivers/parisc/ccio-dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index 059566f54429..9be007c9420f 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -1003,7 +1003,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
ioc->usg_calls++;
#endif
- while(sg_dma_len(sglist) && nents--) {
+ while (nents && sg_dma_len(sglist)) {
#ifdef CCIO_COLLECT_STATS
ioc->usg_pages += sg_dma_len(sglist) >> PAGE_SHIFT;
@@ -1011,6 +1011,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
ccio_unmap_page(dev, sg_dma_address(sglist),
sg_dma_len(sglist), direction, 0);
++sglist;
+ nents--;
}
DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents);