Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dm dm: Remove void casts of function calls
details: https://anonhg.NetBSD.org/src/rev/4d299fccb502
branches: trunk
changeset: 967543:4d299fccb502
user: tkusumi <tkusumi%NetBSD.org@localhost>
date: Sat Dec 14 10:49:30 2019 +0000
description:
dm: Remove void casts of function calls
Use of void casts in dm is not consistent, just get rid of them.
diffstat:
sys/dev/dm/device-mapper.c | 9 ++++-----
sys/dev/dm/dm_dev.c | 10 +++++-----
sys/dev/dm/dm_table.c | 6 +++---
sys/dev/dm/dm_target.c | 10 +++++-----
4 files changed, 17 insertions(+), 18 deletions(-)
diffs (141 lines):
diff -r 7cdebad860f2 -r 4d299fccb502 sys/dev/dm/device-mapper.c
--- a/sys/dev/dm/device-mapper.c Sat Dec 14 10:02:35 2019 +0000
+++ b/sys/dev/dm/device-mapper.c Sat Dec 14 10:49:30 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: device-mapper.c,v 1.49 2019/12/11 14:03:37 tkusumi Exp $ */
+/* $NetBSD: device-mapper.c,v 1.50 2019/12/14 10:49:30 tkusumi Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -282,7 +282,7 @@
disk_destroy(dmv->diskp);
/* Destroy device */
- (void)dm_dev_free(dmv);
+ dm_dev_free(dmv);
/* Decrement device counter After removing device */
atomic_dec_32(&dm_dev_counter);
@@ -505,9 +505,8 @@
* Call sync target routine for all table entries. Target sync
* routine basically call DIOCCACHESYNC on underlying devices.
*/
- SLIST_FOREACH(table_en, tbl, next) {
- (void)table_en->target->sync(table_en);
- }
+ SLIST_FOREACH(table_en, tbl, next)
+ table_en->target->sync(table_en);
dm_table_release(&dmv->table_head, DM_TABLE_ACTIVE);
dm_dev_unbusy(dmv);
break;
diff -r 7cdebad860f2 -r 4d299fccb502 sys/dev/dm/dm_dev.c
--- a/sys/dev/dm/dm_dev.c Sat Dec 14 10:02:35 2019 +0000
+++ b/sys/dev/dm/dm_dev.c Sat Dec 14 10:49:30 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_dev.c,v 1.14 2019/12/07 15:28:39 tkusumi Exp $ */
+/* $NetBSD: dm_dev.c,v 1.15 2019/12/14 10:49:30 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_dev.c,v 1.14 2019/12/07 15:28:39 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_dev.c,v 1.15 2019/12/14 10:49:30 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -306,7 +306,7 @@
mutex_destroy(&dmv->dev_mtx);
cv_destroy(&dmv->dev_cv);
- (void)kmem_free(dmv, sizeof(dm_dev_t));
+ kmem_free(dmv, sizeof(dm_dev_t));
}
mutex_exit(&dm_dev_mutex);
@@ -340,9 +340,9 @@
cv_destroy(&dmv->dev_cv);
if (dmv->diskp != NULL)
- (void)kmem_free(dmv->diskp, sizeof(struct disk));
+ kmem_free(dmv->diskp, sizeof(struct disk));
- (void)kmem_free(dmv, sizeof(dm_dev_t));
+ kmem_free(dmv, sizeof(dm_dev_t));
return 0;
}
diff -r 7cdebad860f2 -r 4d299fccb502 sys/dev/dm/dm_table.c
--- a/sys/dev/dm/dm_table.c Sat Dec 14 10:02:35 2019 +0000
+++ b/sys/dev/dm/dm_table.c Sat Dec 14 10:49:30 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_table.c,v 1.12 2019/12/07 15:28:39 tkusumi Exp $ */
+/* $NetBSD: dm_table.c,v 1.13 2019/12/14 10:49:30 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_table.c,v 1.12 2019/12/07 15:28:39 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_table.c,v 1.13 2019/12/14 10:49:30 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -248,7 +248,7 @@
secsize = 0;
SLIST_FOREACH(table_en, tbl, next) {
length += table_en->length;
- (void)table_en->target->secsize(table_en, &tsecsize);
+ table_en->target->secsize(table_en, &tsecsize);
if (secsize < tsecsize)
secsize = tsecsize;
}
diff -r 7cdebad860f2 -r 4d299fccb502 sys/dev/dm/dm_target.c
--- a/sys/dev/dm/dm_target.c Sat Dec 14 10:02:35 2019 +0000
+++ b/sys/dev/dm/dm_target.c Sat Dec 14 10:49:30 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm_target.c,v 1.27 2019/12/13 16:15:54 tkusumi Exp $ */
+/* $NetBSD: dm_target.c,v 1.28 2019/12/14 10:49:30 tkusumi Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.27 2019/12/13 16:15:54 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.28 2019/12/14 10:49:30 tkusumi Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -87,7 +87,7 @@
gen = module_gen;
/* Try to autoload target module */
- (void)module_autoload(name, MODULE_CLASS_MISC);
+ module_autoload(name, MODULE_CLASS_MISC);
} while (gen != module_gen);
mutex_enter(&dm_target_mutex);
@@ -228,7 +228,7 @@
mutex_exit(&dm_target_mutex);
- (void)kmem_free(dmt, sizeof(dm_target_t));
+ kmem_free(dmt, sizeof(dm_target_t));
return 0;
}
@@ -247,7 +247,7 @@
while ((dm_target = TAILQ_FIRST(&dm_target_list)) != NULL) {
TAILQ_REMOVE(&dm_target_list, dm_target, dm_target_next);
- (void)kmem_free(dm_target, sizeof(dm_target_t));
+ kmem_free(dm_target, sizeof(dm_target_t));
}
KASSERT(TAILQ_EMPTY(&dm_target_list));
Home |
Main Index |
Thread Index |
Old Index