@samitouri / QOSamiQemu / commits / 44f2c7f3df

hw/dma/omap_dma: Fix indentation after ifdef removal

Some of the ifdefs in omap_dma_transfer_setup() which we just removed had if() blocks in them. Now that the code inside them is always unconditional it has an extra unnecessary layer of indentation; fix this, as a whitespace only change. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20260528152852.3349928-4-peter.maydell@linaro.org

Peter Maydell committed May 28, 2026 at 16:28 UTC 44f2c7f3df0028de7991385f568add12e24aca47
1 file changed +70 -70
hw/dma/omap_dma.c
+70 -70
@@ -470,91 +470,91 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
470 /* Set appropriate interrupts and/or deactivate channels */
471
472
473 - /* If the channel is element synchronized, deactivate it */
474 - if (min_elems == elements[omap_dma_intr_element_sync]) {
475 - omap_dma_deactivate_channel(s, ch);
476 - }
473 + /* If the channel is element synchronized, deactivate it */
474 + if (min_elems == elements[omap_dma_intr_element_sync]) {
475 + omap_dma_deactivate_channel(s, ch);
476 + }
477
478 - /* If it is the last frame, set the LAST_FRAME interrupt */
479 - if (min_elems == elements[omap_dma_intr_last_frame]) {
480 - ch->status |= LAST_FRAME_INTR;
481 - }
478 + /* If it is the last frame, set the LAST_FRAME interrupt */
479 + if (min_elems == elements[omap_dma_intr_last_frame]) {
480 + ch->status |= LAST_FRAME_INTR;
481 + }
482
483 - /*
484 - * If exactly half of the frame was reached, set the HALF_FRAME
485 - * interrupt
486 - */
487 - if (min_elems == elements[omap_dma_intr_half_frame]) {
488 - ch->status |= HALF_FRAME_INTR;
489 - }
483 + /*
484 + * If exactly half of the frame was reached, set the HALF_FRAME
485 + * interrupt
486 + */
487 + if (min_elems == elements[omap_dma_intr_half_frame]) {
488 + ch->status |= HALF_FRAME_INTR;
489 + }
490
491 - /* If a full packet has been transferred, set the END_PKT interrupt */
492 - if (min_elems == elements[omap_dma_intr_packet]) {
493 - ch->status |= END_PKT_INTR;
494 - }
491 + /* If a full packet has been transferred, set the END_PKT interrupt */
492 + if (min_elems == elements[omap_dma_intr_packet]) {
493 + ch->status |= END_PKT_INTR;
494 + }
495
496 - /* If the channel is packet-synchronized, deactivate it */
497 - if (min_elems == elements[omap_dma_intr_packet_sync]) {
498 - omap_dma_deactivate_channel(s, ch);
499 - }
496 + /* If the channel is packet-synchronized, deactivate it */
497 + if (min_elems == elements[omap_dma_intr_packet_sync]) {
498 + omap_dma_deactivate_channel(s, ch);
499 + }
500 +
501 + /* If the channel is frame synchronized, deactivate it */
502 + if (min_elems == elements[omap_dma_intr_frame_sync]) {
503 + omap_dma_deactivate_channel(s, ch);
504 + }
505
501 - /* If the channel is frame synchronized, deactivate it */
502 - if (min_elems == elements[omap_dma_intr_frame_sync]) {
506 + /* Set the END_FRAME interrupt */
507 + if (min_elems == elements[omap_dma_intr_frame]) {
508 + ch->status |= END_FRAME_INTR;
509 + }
510 +
511 + if (min_elems == elements[omap_dma_intr_block]) {
512 + /* End of Block */
513 + /* Disable the channel */
514 +
515 + if (!ch->auto_init) {
516 + omap_dma_disable_channel(s, ch);
517 + } else if (ch->repeat || ch->end_prog) {
518 + omap_dma_channel_load(ch);
519 + } else {
520 + ch->waiting_end_prog = 1;
521 omap_dma_deactivate_channel(s, ch);
522 }
523
506 - /* Set the END_FRAME interrupt */
507 - if (min_elems == elements[omap_dma_intr_frame]) {
508 - ch->status |= END_FRAME_INTR;
524 + if (ch->interrupts & END_BLOCK_INTR) {
525 + ch->status |= END_BLOCK_INTR;
526 }
527 + }
528
511 - if (min_elems == elements[omap_dma_intr_block]) {
512 - /* End of Block */
513 - /* Disable the channel */
514 -
515 - if (!ch->auto_init) {
516 - omap_dma_disable_channel(s, ch);
517 - } else if (ch->repeat || ch->end_prog) {
518 - omap_dma_channel_load(ch);
519 - } else {
520 - ch->waiting_end_prog = 1;
521 - omap_dma_deactivate_channel(s, ch);
522 - }
523 -
524 - if (ch->interrupts & END_BLOCK_INTR) {
525 - ch->status |= END_BLOCK_INTR;
526 - }
527 - }
529 + /* Update packet number */
530 + if (ch->fs && ch->bs) {
531 + a->pck_element += min_elems;
532 + a->pck_element %= a->pck_elements;
533 + }
534
529 - /* Update packet number */
530 - if (ch->fs && ch->bs) {
531 - a->pck_element += min_elems;
532 - a->pck_element %= a->pck_elements;
535 + /*
536 + * TODO: check if we really need to update anything here or perhaps we
537 + * can skip part of this.
538 + */
539 + if (dma->update) {
540 + a->element += min_elems;
541 +
542 + frames = a->element / a->elements;
543 + a->element = a->element % a->elements;
544 + a->frame += frames;
545 + a->src += min_elems * a->elem_delta[0] + frames * a->frame_delta[0];
546 + a->dest += min_elems * a->elem_delta[1] + frames * a->frame_delta[1];
547 +
548 + /* If the channel is async, update cpc */
549 + if (!ch->sync && frames) {
550 + ch->cpc = a->dest & 0xffff;
551 }
552
553 /*
536 - * TODO: check if we really need to update anything here or perhaps we
537 - * can skip part of this.
554 + * TODO: if the destination port is IMIF or EMIFF, set the dirty
555 + * bits on it.
556 */
539 - if (dma->update) {
540 - a->element += min_elems;
541 -
542 - frames = a->element / a->elements;
543 - a->element = a->element % a->elements;
544 - a->frame += frames;
545 - a->src += min_elems * a->elem_delta[0] + frames * a->frame_delta[0];
546 - a->dest += min_elems * a->elem_delta[1] + frames * a->frame_delta[1];
547 -
548 - /* If the channel is async, update cpc */
549 - if (!ch->sync && frames) {
550 - ch->cpc = a->dest & 0xffff;
551 - }
552 -
553 - /*
554 - * TODO: if the destination port is IMIF or EMIFF, set the dirty
555 - * bits on it.
556 - */
557 - }
557 + }
558
559 omap_dma_interrupts_update(s);
560 }