diff mbox series

dmaengine: dw-axi-dmac: Simplify assignment in dma_chan_pause()

Message ID 2abd0da35608c14689a919d47dd45898a8ab4297.1635263478.git.geert@linux-m68k.org (mailing list archive)
State Accepted
Commit 2f23355e96b4a5896de2032176197fa0c5c444dd
Headers show
Series dmaengine: dw-axi-dmac: Simplify assignment in dma_chan_pause() | expand

Commit Message

Geert Uytterhoeven Oct. 26, 2021, 3:56 p.m. UTC
Simplify assigning zero and performing a logical OR to a single
assignment.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Vinod Koul Oct. 28, 2021, 5:13 p.m. UTC | #1
On 26-10-21, 17:56, Geert Uytterhoeven wrote:
> Simplify assigning zero and performing a logical OR to a single
> assignment.

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index e8c98b16ae991a59..b907f3acf5c1f31e 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1191,9 +1191,8 @@  static int dma_chan_pause(struct dma_chan *dchan)
 			BIT(chan->id) << DMAC_CHAN_SUSP_WE_SHIFT;
 		axi_dma_iowrite32(chan->chip, DMAC_CHEN, val);
 	} else {
-		val = 0;
-		val |= BIT(chan->id) << DMAC_CHAN_SUSP2_SHIFT |
-			BIT(chan->id) << DMAC_CHAN_SUSP2_WE_SHIFT;
+		val = BIT(chan->id) << DMAC_CHAN_SUSP2_SHIFT |
+		      BIT(chan->id) << DMAC_CHAN_SUSP2_WE_SHIFT;
 		axi_dma_iowrite32(chan->chip, DMAC_CHSUSPREG, val);
 	}