Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata Cosmetic: join some lines. Get out early on err...
details: https://anonhg.NetBSD.org/src/rev/79e672a1bdb5
branches: trunk
changeset: 751002:79e672a1bdb5
user: dyoung <dyoung%NetBSD.org@localhost>
date: Thu Jan 21 02:53:51 2010 +0000
description:
Cosmetic: join some lines. Get out early on errors, change
switch (...) {
...
error = ...;
break;
}
return error;
to
switch (...) {
...
return ...;
}
diffstat:
sys/dev/ata/ata.c | 24 +++++++++---------------
1 files changed, 9 insertions(+), 15 deletions(-)
diffs (76 lines):
diff -r d247a2693245 -r 79e672a1bdb5 sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Thu Jan 21 02:19:55 2010 +0000
+++ b/sys/dev/ata/ata.c Thu Jan 21 02:53:51 2010 +0000
@@ -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)
Home |
Main Index |
Thread Index |
Old Index