Commit 5b276585 authored by Sam Muhammed's avatar Sam Muhammed Committed by Greg Kroah-Hartman

Staging: kpc2000: kpc_dma: Use spaces around operators.

Cleanup Checkpatch.pl CHECKs about missing
spaces around multiple operators.
Signed-off-by: default avatarSam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/22025abc8f8f3452c2d886e8faf1fe0532e8bb1d.1585143581.git.jane.pnx9@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent edf279ab
...@@ -19,7 +19,7 @@ static inline ...@@ -19,7 +19,7 @@ static inline
unsigned int count_pages(unsigned long iov_base, size_t iov_len) unsigned int count_pages(unsigned long iov_base, size_t iov_len)
{ {
unsigned long first = (iov_base & PAGE_MASK) >> PAGE_SHIFT; unsigned long first = (iov_base & PAGE_MASK) >> PAGE_SHIFT;
unsigned long last = ((iov_base+iov_len-1) & PAGE_MASK) >> PAGE_SHIFT; unsigned long last = ((iov_base + iov_len - 1) & PAGE_MASK) >> PAGE_SHIFT;
return last - first + 1; return last - first + 1;
} }
...@@ -84,7 +84,7 @@ static int kpc_dma_transfer(struct dev_private_data *priv, ...@@ -84,7 +84,7 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
} }
// Allocate and setup the sg_table (scatterlist entries) // Allocate and setup the sg_table (scatterlist entries)
rv = sg_alloc_table_from_pages(&acd->sgt, acd->user_pages, acd->page_count, iov_base & (PAGE_SIZE-1), iov_len, GFP_KERNEL); rv = sg_alloc_table_from_pages(&acd->sgt, acd->user_pages, acd->page_count, iov_base & (PAGE_SIZE - 1), iov_len, GFP_KERNEL);
if (rv) { if (rv) {
dev_err(&priv->ldev->pldev->dev, "Couldn't alloc sg_table (%ld)\n", rv); dev_err(&priv->ldev->pldev->dev, "Couldn't alloc sg_table (%ld)\n", rv);
goto err_alloc_sg_table; goto err_alloc_sg_table;
...@@ -127,7 +127,7 @@ static int kpc_dma_transfer(struct dev_private_data *priv, ...@@ -127,7 +127,7 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
// Fill out the descriptor // Fill out the descriptor
BUG_ON(!desc); BUG_ON(!desc);
clear_desc(desc); clear_desc(desc);
if (p != pcnt-1) if (p != pcnt - 1)
desc->DescByteCount = 0x80000; desc->DescByteCount = 0x80000;
else else
desc->DescByteCount = sg_dma_len(sg) - (p * 0x80000); desc->DescByteCount = sg_dma_len(sg) - (p * 0x80000);
...@@ -137,7 +137,7 @@ static int kpc_dma_transfer(struct dev_private_data *priv, ...@@ -137,7 +137,7 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
desc->DescControlFlags |= DMA_DESC_CTL_IRQONERR; desc->DescControlFlags |= DMA_DESC_CTL_IRQONERR;
if (i == 0 && p == 0) if (i == 0 && p == 0)
desc->DescControlFlags |= DMA_DESC_CTL_SOP; desc->DescControlFlags |= DMA_DESC_CTL_SOP;
if (i == acd->mapped_entry_count-1 && p == pcnt-1) if (i == acd->mapped_entry_count - 1 && p == pcnt - 1)
desc->DescControlFlags |= DMA_DESC_CTL_EOP | DMA_DESC_CTL_IRQONDONE; desc->DescControlFlags |= DMA_DESC_CTL_EOP | DMA_DESC_CTL_IRQONDONE;
desc->DescCardAddrLS = (card_addr & 0xFFFFFFFF); desc->DescCardAddrLS = (card_addr & 0xFFFFFFFF);
...@@ -149,13 +149,13 @@ static int kpc_dma_transfer(struct dev_private_data *priv, ...@@ -149,13 +149,13 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
desc->DescSystemAddrMS = (dma_addr & 0xFFFFFFFF00000000UL) >> 32; desc->DescSystemAddrMS = (dma_addr & 0xFFFFFFFF00000000UL) >> 32;
user_ctl = acd->priv->user_ctl; user_ctl = acd->priv->user_ctl;
if (i == acd->mapped_entry_count-1 && p == pcnt-1) if (i == acd->mapped_entry_count - 1 && p == pcnt - 1)
user_ctl = acd->priv->user_ctl_last; user_ctl = acd->priv->user_ctl_last;
desc->DescUserControlLS = (user_ctl & 0x00000000FFFFFFFFUL) >> 0; desc->DescUserControlLS = (user_ctl & 0x00000000FFFFFFFFUL) >> 0;
desc->DescUserControlMS = (user_ctl & 0xFFFFFFFF00000000UL) >> 32; desc->DescUserControlMS = (user_ctl & 0xFFFFFFFF00000000UL) >> 32;
if (i == acd->mapped_entry_count-1 && p == pcnt-1) if (i == acd->mapped_entry_count - 1 && p == pcnt - 1)
desc->acd = acd; desc->acd = acd;
dev_dbg(&priv->ldev->pldev->dev, " Filled descriptor %p (acd = %p)\n", desc, desc->acd); dev_dbg(&priv->ldev->pldev->dev, " Filled descriptor %p (acd = %p)\n", desc, desc->acd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment