summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2015-01-27 03:17:35 +0000
committerdlg <dlg@openbsd.org>2015-01-27 03:17:35 +0000
commite419548092f59c20a140404818050eb2ab331a19 (patch)
treeff250435e8b28c07c967073741c21d374241b774 /sys/kern/subr_disk.c
parentRemove an unused and confusing assignment that had been commented out for (diff)
downloadwireguard-openbsd-e419548092f59c20a140404818050eb2ab331a19.tar.xz
wireguard-openbsd-e419548092f59c20a140404818050eb2ab331a19.zip
remove the second void * argument on tasks.
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier. now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument. so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it. ok krw@
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 80dbc2efab7..7aafad75b94 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.179 2014/12/30 04:00:33 krw Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.180 2015/01/27 03:17:36 dlg Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -99,7 +99,7 @@ struct disk_attach_task {
struct disk *dk;
};
-void disk_attach_callback(void *, void *);
+void disk_attach_callback(void *);
/*
* Compute checksum for disk label.
@@ -1105,7 +1105,7 @@ disk_attach(struct device *dv, struct disk *diskp)
device_ref(dv);
dat->dk = diskp;
- task_set(&dat->task, disk_attach_callback, dat, NULL);
+ task_set(&dat->task, disk_attach_callback, dat);
task_add(systq, &dat->task);
}
}
@@ -1115,7 +1115,7 @@ disk_attach(struct device *dv, struct disk *diskp)
}
void
-disk_attach_callback(void *xdat, void *null)
+disk_attach_callback(void *xdat)
{
struct disk_attach_task *dat = xdat;
struct disk *dk = dat->dk;