Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev KNF
details: https://anonhg.NetBSD.org/src/rev/69366fa64def
branches: trunk
changeset: 937743:69366fa64def
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Aug 25 13:42:09 2020 +0000
description:
KNF
diffstat:
sys/dev/ata/ata_raid.c | 18 +++++++-------
sys/dev/raidframe/rf_netbsdkintf.c | 44 +++++++++++++++++++-------------------
2 files changed, 31 insertions(+), 31 deletions(-)
diffs (236 lines):
diff -r cac7852ec467 -r 69366fa64def sys/dev/ata/ata_raid.c
--- a/sys/dev/ata/ata_raid.c Tue Aug 25 13:39:16 2020 +0000
+++ b/sys/dev/ata/ata_raid.c Tue Aug 25 13:42:09 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_raid.c,v 1.42 2019/04/26 11:51:56 pgoyette Exp $ */
+/* $NetBSD: ata_raid.c,v 1.43 2020/08/25 13:42:09 skrll Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.42 2019/04/26 11:51:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.43 2020/08/25 13:42:09 skrll Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -141,9 +141,9 @@
};
if (type < __arraycount(ata_raid_type_names))
- return (ata_raid_type_names[type]);
+ return ata_raid_type_names[type];
- return (NULL);
+ return NULL;
}
/*
@@ -176,7 +176,7 @@
ataraid_cd.cd_name);
out:
- return (1);
+ return 1;
}
/*
@@ -189,7 +189,7 @@
{
/* pseudo-device; always present */
- return (1);
+ return 1;
}
/*
@@ -233,7 +233,7 @@
if (pnp != NULL)
aprint_normal("block device at %s", pnp);
aprint_normal(" vendtype %d unit %d", aai->aai_type, aai->aai_arrayno);
- return (UNCONF);
+ return UNCONF;
}
/*
@@ -295,7 +295,7 @@
TAILQ_INSERT_TAIL(&ataraid_array_info_list, aai, aai_list);
out:
- return (aai);
+ return aai;
}
int
@@ -317,7 +317,7 @@
error = biowait(bp);
putiobuf(bp);
- return (error);
+ return error;
}
MODULE(MODULE_CLASS_DRIVER, ataraid, NULL);
diff -r cac7852ec467 -r 69366fa64def sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Tue Aug 25 13:39:16 2020 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Tue Aug 25 13:42:09 2020 +0000
@@ -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_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 @@
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 @@
bad:
raidunlock(rs);
- return (error);
+ return error;
}
@@ -858,7 +858,7 @@
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 @@
raidput(rs);
}
- return (error);
+ return error;
}
@@ -974,9 +974,9 @@
return ENXIO;
if ((rs->sc_flags & RAIDF_INITED) == 0)
- return (ENXIO);
-
- return (physio(raidstrategy, NULL, dev, B_READ, minphys, uio));
+ return ENXIO;
+
+ return physio(raidstrategy, NULL, dev, B_READ, minphys, uio);
}
@@ -991,9 +991,9 @@
return ENXIO;
if ((rs->sc_flags & RAIDF_INITED) == 0)
- return (ENXIO);
-
- return (physio(raidstrategy, NULL, dev, B_WRITE, minphys, uio));
+ return ENXIO;
+
+ return physio(raidstrategy, NULL, dev, B_WRITE, minphys, uio);
}
@@ -1742,7 +1742,7 @@
}
if (!raidPtr->valid)
- return (EINVAL);
+ return EINVAL;
/*
* Add support for "regular" device ioctls here.
@@ -1762,7 +1762,7 @@
break;
}
- return (retcode);
+ return retcode;
}
@@ -1858,7 +1858,7 @@
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 @@
}
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 @@
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 @@
return ENXIO;
if ((error = raidlock(rs)) != 0)
- return (error);
+ return error;
error = raid_detach_unlocked(rs);
@@ -3755,14 +3755,14 @@
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++) {
Home |
Main Index |
Thread Index |
Old Index