Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/broadcom Remove unnecessary gotos and label. S...



details:   https://anonhg.NetBSD.org/src/rev/23bc5bf97787
branches:  trunk
changeset: 365977:23bc5bf97787
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat May 07 07:26:27 2022 +0000

description:
Remove unnecessary gotos and label.  Same code before and after.

diffstat:

 sys/arch/arm/broadcom/bcm2835_spi.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r 261441e13191 -r 23bc5bf97787 sys/arch/arm/broadcom/bcm2835_spi.c
--- a/sys/arch/arm/broadcom/bcm2835_spi.c       Sat May 07 07:10:46 2022 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_spi.c       Sat May 07 07:26:27 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_spi.c,v 1.11 2021/08/07 16:18:43 thorpej Exp $ */
+/*     $NetBSD: bcm2835_spi.c,v 1.12 2022/05/07 07:26:27 skrll Exp $   */
 
 /*
  * Copyright (c) 2012 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_spi.c,v 1.11 2021/08/07 16:18:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_spi.c,v 1.12 2022/05/07 07:26:27 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -298,7 +298,6 @@
        if (ISSET(cs, SPI_CS_DONE)) {
                if (sc->sc_wchunk != NULL) {
                        bcmspi_send(sc);
-                       goto end;
                } else {
                        bus_space_write_4(sc->sc_iot, sc->sc_ioh, SPI_CS,
                            sc->sc_CS);
@@ -309,14 +308,12 @@
                        KASSERT(st != NULL);
                        spi_done(st, 0);
                        sc->sc_running = false;
-                       goto end;
                }
        } else if (ISSET(cs, SPI_CS_RXR)) {
                bcmspi_recv(sc);
                bcmspi_send(sc);
        }
 
-end:
        mutex_exit(&sc->sc_mutex);
        return ISSET(cs, SPI_CS_DONE|SPI_CS_RXR);
 }



Home | Main Index | Thread Index | Old Index