Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci KNF. Remove brackets around return values.



details:   https://anonhg.NetBSD.org/src/rev/b28977555e87
branches:  trunk
changeset: 368274:b28977555e87
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Jul 02 08:39:48 2022 +0000

description:
KNF. Remove brackets around return values.

diffstat:

 sys/dev/pci/if_bge.c |  34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diffs (129 lines):

diff -r bf9e1510bbd9 -r b28977555e87 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Sat Jul 02 08:35:49 2022 +0000
+++ b/sys/dev/pci/if_bge.c      Sat Jul 02 08:39:48 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.361 2022/07/02 08:33:26 skrll Exp $       */
+/*     $NetBSD: if_bge.c,v 1.362 2022/07/02 08:39:48 skrll Exp $       */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.361 2022/07/02 08:33:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.362 2022/07/02 08:39:48 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -588,7 +588,7 @@
 bge_readreg_ind(struct bge_softc *sc, int off)
 {
        pci_conf_write(sc->sc_pc, sc->sc_pcitag, BGE_PCI_REG_BASEADDR, off);
-       return (pci_conf_read(sc->sc_pc, sc->sc_pcitag, BGE_PCI_REG_DATA));
+       return pci_conf_read(sc->sc_pc, sc->sc_pcitag, BGE_PCI_REG_DATA);
 }
 #endif
 
@@ -731,7 +731,7 @@
        int i, off;
 
        if ((sc->bge_mfw_flags & BGE_MFW_ON_APE) == 0)
-               return (0);
+               return 0;
 
        /* Lock request/grant registers have different bases. */
        if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5761) {
@@ -748,7 +748,7 @@
        case BGE_APE_LOCK_GPIO:
                /* Lock required when using GPIO. */
                if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5761)
-                       return (0);
+                       return 0;
                if (pa->pa_function == 0)
                        bit = BGE_APE_LOCK_REQ_DRIVER0;
                else
@@ -776,7 +776,7 @@
                bit = BGE_APE_LOCK_REQ_DRIVER0;
                break;
        default:
-               return (EINVAL);
+               return EINVAL;
        }
 
        /* Request a lock. */
@@ -799,10 +799,10 @@
                    status & 0xFFFF);
                /* Revoke the lock request. */
                APE_WRITE_4(sc, gnt + off, bit);
-               return (EBUSY);
-       }
-
-       return (0);
+               return EBUSY;
+       }
+
+       return 0;
 }
 
 void
@@ -1009,7 +1009,7 @@
                *(dest + i) = byte;
        }
 
-       return (error ? 1 : 0);
+       return error ? 1 : 0;
 }
 
 /*
@@ -1075,7 +1075,7 @@
                *(dest + i) = byte;
        }
 
-       return (error ? 1 : 0);
+       return error ? 1 : 0;
 }
 
 static int
@@ -1413,7 +1413,7 @@
 
        SLIST_REMOVE_HEAD(&sc->bge_jfree_listhead, jpool_entries);
        SLIST_INSERT_HEAD(&sc->bge_jinuse_listhead, entry, jpool_entries);
-       return (sc->bge_cdata.bge_jslots[entry->slot]);
+       return sc->bge_cdata.bge_jslots[entry->slot];
 }
 
 /*
@@ -3144,7 +3144,7 @@
                if (BGE_IS_575X_PLUS(sc))
                        can_use_msi = 1;
        }
-       return (can_use_msi);
+       return can_use_msi;
 }
 
 /*
@@ -4672,14 +4672,14 @@
                if (sc->bge_lasttag == statustag &&
                    (~pcistate & intrmask)) {
                        BGE_EVCNT_INCR(sc->bge_ev_intr_spurious);
-                       return (0);
+                       return 0;
                }
                sc->bge_lasttag = statustag;
        } else {
                if (!(statusword & BGE_STATFLAG_UPDATED) &&
                    !(~pcistate & intrmask)) {
                        BGE_EVCNT_INCR(sc->bge_ev_intr_spurious2);
-                       return (0);
+                       return 0;
                }
                statustag = 0;
        }
@@ -6410,5 +6410,5 @@
                if ((*func)(sc, eaddr) == 0)
                        break;
        }
-       return (*func == NULL ? ENXIO : 0);
+       return *func == NULL ? ENXIO : 0;
 }



Home | Main Index | Thread Index | Old Index