All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: dw-axi-dmac: Simplify assignment in dma_chan_pause()
@ 2021-10-26 15:56 Geert Uytterhoeven
  2021-10-28 17:13 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2021-10-26 15:56 UTC (permalink / raw)
  To: Eugeniy Paltsev, Vinod Koul; +Cc: dmaengine, linux-kernel, Geert Uytterhoeven

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(-)

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);
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: dw-axi-dmac: Simplify assignment in dma_chan_pause()
  2021-10-26 15:56 [PATCH] dmaengine: dw-axi-dmac: Simplify assignment in dma_chan_pause() Geert Uytterhoeven
@ 2021-10-28 17:13 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-10-28 17:13 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Eugeniy Paltsev, dmaengine, linux-kernel

On 26-10-21, 17:56, Geert Uytterhoeven wrote:
> Simplify assigning zero and performing a logical OR to a single
> assignment.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-28 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 15:56 [PATCH] dmaengine: dw-axi-dmac: Simplify assignment in dma_chan_pause() Geert Uytterhoeven
2021-10-28 17:13 ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.