Use NULL for SYSINIT's last arg, which is a pointer type

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2018-05-18 17:58:09 +00:00
parent 3dc3b1235a
commit 891cf3ed44
15 changed files with 21 additions and 19 deletions

View File

@ -4179,4 +4179,4 @@ acpi_pm_register(void *arg)
power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL);
}
SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, 0);
SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, NULL);

View File

@ -126,7 +126,7 @@ sysctl_register_fdt_oid(void *arg)
CTLTYPE_OPAQUE | CTLFLAG_RD, NULL, 0, sysctl_handle_dtb, "",
"Device Tree Blob");
}
SYSINIT(dtb_oid, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_fdt_oid, 0);
SYSINIT(dtb_oid, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_fdt_oid, NULL);
static int
ofw_fdt_init(ofw_t ofw, void *data)

View File

@ -252,7 +252,7 @@ cuse_kern_init(void *arg)
(CUSE_VERSION >> 16) & 0xFF, (CUSE_VERSION >> 8) & 0xFF,
(CUSE_VERSION >> 0) & 0xFF);
}
SYSINIT(cuse_kern_init, SI_SUB_DEVFS, SI_ORDER_ANY, cuse_kern_init, 0);
SYSINIT(cuse_kern_init, SI_SUB_DEVFS, SI_ORDER_ANY, cuse_kern_init, NULL);
static void
cuse_kern_uninit(void *arg)

View File

@ -1532,4 +1532,4 @@ apm_pm_register(void *arg)
power_pm_register(POWER_PM_TYPE_APM, apm_pm_func, NULL);
}
SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, apm_pm_register, 0);
SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, apm_pm_register, NULL);

View File

@ -747,8 +747,10 @@ imgact_binmisc_fini(void *arg)
sx_destroy(&interp_list_sx);
}
SYSINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_init, 0);
SYSUNINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_fini, 0);
SYSINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_init,
NULL);
SYSUNINIT(imgact_binmisc, SI_SUB_EXEC, SI_ORDER_MIDDLE, imgact_binmisc_fini,
NULL);
/*
* Tell kern_execve.c about it, with a little help from the linker.

View File

@ -163,7 +163,7 @@ linker_init(void *arg)
TAILQ_INIT(&linker_files);
}
SYSINIT(linker, SI_SUB_KLD, SI_ORDER_FIRST, linker_init, 0);
SYSINIT(linker, SI_SUB_KLD, SI_ORDER_FIRST, linker_init, NULL);
static void
linker_stop_class_add(void *arg)
@ -411,7 +411,7 @@ linker_init_kernel_modules(void)
}
SYSINIT(linker_kernel, SI_SUB_KLD, SI_ORDER_ANY, linker_init_kernel_modules,
0);
NULL);
static int
linker_load_file(const char *filename, linker_file_t *result)
@ -1684,7 +1684,7 @@ linker_preload(void *arg)
/* woohoo! we made it! */
}
SYSINIT(preload, SI_SUB_KLD, SI_ORDER_MIDDLE, linker_preload, 0);
SYSINIT(preload, SI_SUB_KLD, SI_ORDER_MIDDLE, linker_preload, NULL);
/*
* Handle preload files that failed to load any modules.
@ -1719,7 +1719,7 @@ linker_preload_finish(void *arg)
* becomes runnable in SI_SUB_KTHREAD_INIT, so go slightly before that.
*/
SYSINIT(preload_finish, SI_SUB_KTHREAD_INIT - 100, SI_ORDER_MIDDLE,
linker_preload_finish, 0);
linker_preload_finish, NULL);
/*
* Search for a not-loaded module by name.

View File

@ -89,7 +89,7 @@ module_init(void *arg)
SHUTDOWN_PRI_DEFAULT);
}
SYSINIT(module, SI_SUB_KLD, SI_ORDER_FIRST, module_init, 0);
SYSINIT(module, SI_SUB_KLD, SI_ORDER_FIRST, module_init, NULL);
static void
module_shutdown(void *arg1, int arg2)

View File

@ -109,7 +109,7 @@ sleepinit(void *unused)
* vmem tries to lock the sleepq mutexes when free'ing kva, so make sure
* it is available.
*/
SYSINIT(sleepinit, SI_SUB_KMEM, SI_ORDER_ANY, sleepinit, 0);
SYSINIT(sleepinit, SI_SUB_KMEM, SI_ORDER_ANY, sleepinit, NULL);
/*
* General sleep call. Suspends the current thread until a wakeup is

View File

@ -921,7 +921,7 @@ sysctl_register_all(void *arg)
sysctl_register_oid(*oidp);
SYSCTL_WUNLOCK();
}
SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_FIRST, sysctl_register_all, 0);
SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_FIRST, sysctl_register_all, NULL);
/*
* "Staff-functions"

View File

@ -469,7 +469,7 @@ link_elf_init(void* arg)
#endif
}
SYSINIT(link_elf, SI_SUB_KLD, SI_ORDER_THIRD, link_elf_init, 0);
SYSINIT(link_elf, SI_SUB_KLD, SI_ORDER_THIRD, link_elf_init, NULL);
static int
link_elf_preload_parse_symbols(elf_file_t ef)

View File

@ -194,7 +194,7 @@ link_elf_init(void *arg)
linker_add_class(&link_elf_class);
}
SYSINIT(link_elf_obj, SI_SUB_KLD, SI_ORDER_SECOND, link_elf_init, 0);
SYSINIT(link_elf_obj, SI_SUB_KLD, SI_ORDER_SECOND, link_elf_init, NULL);
static int
link_elf_link_preload(linker_class_t cls, const char *filename,

View File

@ -173,5 +173,5 @@ p31b_set_standard(void *dummy)
}
SYSINIT(p31b_set_standard, SI_SUB_P1003_1B, SI_ORDER_ANY, p31b_set_standard,
0);
NULL);

View File

@ -127,7 +127,7 @@ dpcpu_startup(void *dummy __unused)
TAILQ_INSERT_HEAD(&dpcpu_head, df, df_link);
sx_init(&dpcpu_lock, "dpcpu alloc lock");
}
SYSINIT(dpcpu, SI_SUB_KLD, SI_ORDER_FIRST, dpcpu_startup, 0);
SYSINIT(dpcpu, SI_SUB_KLD, SI_ORDER_FIRST, dpcpu_startup, NULL);
/*
* UMA_PCPU_ZONE zones, that are available for all kernel

View File

@ -228,7 +228,7 @@ route_init(void)
if (rt_numfibs == 0)
rt_numfibs = 1;
}
SYSINIT(route_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, route_init, 0);
SYSINIT(route_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, route_init, NULL);
static int
rtentry_zinit(void *mem, int size, int how)

View File

@ -349,7 +349,7 @@ vnet_data_startup(void *dummy __unused)
TAILQ_INSERT_HEAD(&vnet_data_free_head, df, vnd_link);
sx_init(&vnet_data_free_lock, "vnet_data alloc lock");
}
SYSINIT(vnet_data, SI_SUB_KLD, SI_ORDER_FIRST, vnet_data_startup, 0);
SYSINIT(vnet_data, SI_SUB_KLD, SI_ORDER_FIRST, vnet_data_startup, NULL);
/* Dummy VNET_SYSINIT to make sure we always reach the final end state. */
static void