summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authorskrll <skrll@NetBSD.org>2020-08-25 13:42:09 +0000
committerskrll <skrll@NetBSD.org>2020-08-25 13:42:09 +0000
commit88ccaac7c24201abf88bc79aeeab55c3d0ebb4ce (patch)
tree81d34e60623f2e069c7537230d9f0859c4fd5bc1 /sys/dev/raidframe
parente6443b8ea872851c825f64538c22d032b82aabe6 (diff)
KNF
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 68af9a2999a..d9b0124b6a6 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.388 2020/07/31 20:35:33 christos Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.389 2020/08/25 13:50:00 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.388 2020/07/31 20:35:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.389 2020/08/25 13:50:00 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_raid_autoconfig.h"
@@ -404,7 +404,7 @@ rf_autoconfig(device_t self)
RF_ConfigSet_t *config_sets;
if (!raidautoconfig || raidautoconfigdone == true)
- return (0);
+ return 0;
/* XXX This code can only be run once. */
raidautoconfigdone = true;
@@ -787,7 +787,7 @@ raidopen(dev_t dev, int flags, int fmt,
if ((rs = raidget(unit, true)) == NULL)
return ENXIO;
if ((error = raidlock(rs)) != 0)
- return (error);
+ return error;
if ((rs->sc_flags & RAIDF_SHUTDOWN) != 0) {
error = EBUSY;
@@ -818,7 +818,7 @@ raidopen(dev_t dev, int flags, int fmt,
bad:
raidunlock(rs);
- return (error);
+ return error;
}
@@ -858,7 +858,7 @@ raidclose(dev_t dev, int flags, int fmt, struct lwp *l)
dksc = &rs->sc_dksc;
if ((error = raidlock(rs)) != 0)
- return (error);
+ return error;
if ((rs->sc_flags & RAIDF_INITED) != 0) {
error = dk_close(dksc, dev, flags, fmt, l);
@@ -879,7 +879,7 @@ raidclose(dev_t dev, int flags, int fmt, struct lwp *l)
raidput(rs);
}
- return (error);
+ return error;
}
@@ -974,9 +974,9 @@ raidread(dev_t dev, struct uio *uio, int flags)
return ENXIO;
if ((rs->sc_flags & RAIDF_INITED) == 0)
- return (ENXIO);
+ return ENXIO;
- return (physio(raidstrategy, NULL, dev, B_READ, minphys, uio));
+ return physio(raidstrategy, NULL, dev, B_READ, minphys, uio);
}
@@ -991,9 +991,9 @@ raidwrite(dev_t dev, struct uio *uio, int flags)
return ENXIO;
if ((rs->sc_flags & RAIDF_INITED) == 0)
- return (ENXIO);
+ return ENXIO;
- return (physio(raidstrategy, NULL, dev, B_WRITE, minphys, uio));
+ return physio(raidstrategy, NULL, dev, B_WRITE, minphys, uio);
}
@@ -1742,7 +1742,7 @@ raidioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
}
if (!raidPtr->valid)
- return (EINVAL);
+ return EINVAL;
/*
* Add support for "regular" device ioctls here.
@@ -1762,7 +1762,7 @@ raidioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
break;
}
- return (retcode);
+ return retcode;
}
@@ -1858,7 +1858,7 @@ rf_GetSpareTableFromDaemon(RF_SparetWait_t *req)
retcode = req->fcol;
RF_Free(req, sizeof(*req)); /* this is not the same req as we
* alloc'd */
- return (retcode);
+ return retcode;
}
#endif
@@ -2043,7 +2043,7 @@ rf_DispatchKernelIO(RF_DiskQueue_t *queue, RF_DiskQueueData_t *req)
}
db1_printf(("Exiting from DispatchKernelIO\n"));
- return (0);
+ return 0;
}
/* this is the callback function associated with a I/O invoked from
kernel code.
@@ -2164,7 +2164,7 @@ raidlock(struct raid_softc *rs)
rs->sc_flags |= RAIDF_LOCKED;
done:
mutex_exit(&rs->sc_mutex);
- return (error);
+ return error;
}
/*
* Unlock and wake up any waiters.
@@ -3577,7 +3577,7 @@ raid_detach(device_t self, int flags)
return ENXIO;
if ((error = raidlock(rs)) != 0)
- return (error);
+ return error;
error = raid_detach_unlocked(rs);
@@ -3755,14 +3755,14 @@ rf_get_info(RF_Raid_t *raidPtr, RF_DeviceConfig_t *config)
int d, i, j;
if (!raidPtr->valid)
- return (ENODEV);
+ return ENODEV;
config->cols = raidPtr->numCol;
config->ndevs = raidPtr->numCol;
if (config->ndevs >= RF_MAX_DISKS)
- return (ENOMEM);
+ return ENOMEM;
config->nspares = raidPtr->numSpare;
if (config->nspares >= RF_MAX_DISKS)
- return (ENOMEM);
+ return ENOMEM;
config->maxqdepth = raidPtr->maxQueueDepth;
d = 0;
for (j = 0; j < config->cols; j++) {