Skip to content

Commit 42468aa

Browse files
ambarusvinodkoul
authored andcommitted
dmaengine: at_xdmac: Remove a level of indentation in at_xdmac_advance_work()
It's easier to read code with fewer levels of indentation, remove a level of indentation in at_xdmac_advance_work() if (!foo() & !bar()) { } was replaced by: if (foo() || bar()) return; Signed-off-by: Tudor Ambarus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 18dedde commit 42468aa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/dma/at_xdmac.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,14 +1593,14 @@ static void at_xdmac_advance_work(struct at_xdmac_chan *atchan)
15931593
* If channel is enabled, do nothing, advance_work will be triggered
15941594
* after the interruption.
15951595
*/
1596-
if (!at_xdmac_chan_is_enabled(atchan) && !list_empty(&atchan->xfers_list)) {
1597-
desc = list_first_entry(&atchan->xfers_list,
1598-
struct at_xdmac_desc,
1599-
xfer_node);
1600-
dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
1601-
if (!desc->active_xfer)
1602-
at_xdmac_start_xfer(atchan, desc);
1603-
}
1596+
if (at_xdmac_chan_is_enabled(atchan) || list_empty(&atchan->xfers_list))
1597+
return;
1598+
1599+
desc = list_first_entry(&atchan->xfers_list, struct at_xdmac_desc,
1600+
xfer_node);
1601+
dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
1602+
if (!desc->active_xfer)
1603+
at_xdmac_start_xfer(atchan, desc);
16041604
}
16051605

16061606
static void at_xdmac_handle_cyclic(struct at_xdmac_chan *atchan)

0 commit comments

Comments
 (0)