diff options
| author | 2015-01-27 03:17:35 +0000 | |
|---|---|---|
| committer | 2015-01-27 03:17:35 +0000 | |
| commit | e419548092f59c20a140404818050eb2ab331a19 (patch) | |
| tree | ff250435e8b28c07c967073741c21d374241b774 /sys/net/if.c | |
| parent | Remove an unused and confusing assignment that had been commented out for (diff) | |
| download | wireguard-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/net/if.c')
| -rw-r--r-- | sys/net/if.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 8cef7bbb507..4b70862449a 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.313 2015/01/21 02:23:14 guenther Exp $ */ +/* $OpenBSD: if.c,v 1.314 2015/01/27 03:17:36 dlg Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -142,7 +142,7 @@ struct if_clone *if_clone_lookup(const char *, int *); void if_congestion_clear(void *); int if_group_egress_build(void); -void if_link_state_change_task(void *, void *); +void if_link_state_change_task(void *); #ifdef DDB void ifa_print_all(void); @@ -265,8 +265,7 @@ if_attachsetup(struct ifnet *ifp) timeout_set(ifp->if_slowtimo, if_slowtimo, ifp); if_slowtimo(ifp); - task_set(ifp->if_linkstatetask, if_link_state_change_task, - ifp, NULL); + task_set(ifp->if_linkstatetask, if_link_state_change_task, ifp); /* Announce the interface. */ rt_ifannouncemsg(ifp, IFAN_ARRIVAL); @@ -1119,7 +1118,7 @@ if_link_state_change(struct ifnet *ifp) * Process a link state change. */ void -if_link_state_change_task(void *arg, void *unused) +if_link_state_change_task(void *arg) { struct ifnet *ifp = arg; int s; |
