Module Name:    src
Committed By:   dyoung
Date:           Thu Jan 21 02:53:51 UTC 2010

Modified Files:
        src/sys/dev/ata: ata.c

Log Message:
Cosmetic: join some lines.  Get out early on errors, change

        switch (...) {
                ...
                error = ...;
                break;
        }
        return error;

to

        switch (...) {
                ...
                return ...;
        }


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/ata/ata.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.110 src/sys/dev/ata/ata.c:1.111
--- src/sys/dev/ata/ata.c:1.110	Fri Jan  8 19:48:11 2010
+++ src/sys/dev/ata/ata.c	Thu Jan 21 02:53:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata.c,v 1.110 2010/01/08 19:48:11 dyoung Exp $	*/
+/*	$NetBSD: ata.c,v 1.111 2010/01/21 02:53:51 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.110 2010/01/08 19:48:11 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.111 2010/01/21 02:53:51 dyoung Exp $");
 
 #include "opt_ata.h"
 
@@ -1409,8 +1409,7 @@
 
 /* management of the /dev/atabus* devices */
 int
-atabusopen(dev_t dev, int flag, int fmt,
-    struct lwp *l)
+atabusopen(dev_t dev, int flag, int fmt, struct lwp *l)
 {
 	struct atabus_softc *sc;
 	int error;
@@ -1432,8 +1431,7 @@
 
 
 int
-atabusclose(dev_t dev, int flag, int fmt,
-    struct lwp *l)
+atabusclose(dev_t dev, int flag, int fmt, struct lwp *l)
 {
 	struct atabus_softc *sc =
 	    device_lookup_private(&atabus_cd, minor(dev));
@@ -1446,8 +1444,7 @@
 }
 
 int
-atabusioctl(dev_t dev, u_long cmd, void *addr, int flag,
-    struct lwp *l)
+atabusioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
 {
 	struct atabus_softc *sc =
 	    device_lookup_private(&atabus_cd, minor(dev));
@@ -1474,8 +1471,7 @@
 		s = splbio();
 		ata_reset_channel(sc->sc_chan, AT_WAIT | AT_POLL);
 		splx(s);
-		error = 0;
-		break;
+		return 0;
 	case ATABUSIOSCAN:
 	{
 #if 0
@@ -1515,14 +1511,12 @@
 				KASSERT(chp->ch_drive[drive].drv_softc == NULL);
 			}
 		}
-		error = 0;
-		break;
+		return 0;
 	}
 	default:
-		error = ENOTTY;
+		return ENOTTY;
 	}
-	return (error);
-};
+}
 
 static bool
 atabus_suspend(device_t dv, pmf_qual_t qual)

Reply via email to