Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Remove confusing braces. No binary changes.



details:   https://anonhg.NetBSD.org/src/rev/5224a1ad6696
branches:  trunk
changeset: 371249:5224a1ad6696
user:      rin <rin%NetBSD.org@localhost>
date:      Sat Oct 01 12:27:29 2022 +0000

description:
Remove confusing braces. No binary changes.

diffstat:

 sys/dev/pci/genfb_pci.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 19b1ba7571b8 -r 5224a1ad6696 sys/dev/pci/genfb_pci.c
--- a/sys/dev/pci/genfb_pci.c   Sat Oct 01 12:24:19 2022 +0000
+++ b/sys/dev/pci/genfb_pci.c   Sat Oct 01 12:27:29 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfb_pci.c,v 1.42 2022/10/01 12:24:19 rin Exp $ */
+/*     $NetBSD: genfb_pci.c,v 1.43 2022/10/01 12:27:29 rin Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.42 2022/10/01 12:24:19 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.43 2022/10/01 12:27:29 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -212,6 +212,7 @@
     struct lwp *l)
 {
        struct pci_genfb_softc *sc = v;
+       int new_mode, i;
 
        switch (cmd) {
        case WSDISPLAYIO_GTYPE:
@@ -228,8 +229,8 @@
                return wsdisplayio_busid_pci(sc->sc_gen.sc_dev, sc->sc_pc,
                    sc->sc_pcitag, data);
 
-       case WSDISPLAYIO_SMODE: {
-               int new_mode = *(int*)data, i;
+       case WSDISPLAYIO_SMODE:
+               new_mode = *(int *)data;
                if (new_mode == WSDISPLAYIO_MODE_EMUL) {
                        for (i = 0; i < 9; i++)
                                pci_conf_write(sc->sc_pc,
@@ -237,7 +238,6 @@
                                     0x10 + (i << 2),
                                     sc->sc_bars[i]);
                }
-               }
                return 0;
        }
 



Home | Main Index | Thread Index | Old Index