summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-18 20:21:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-18 20:21:52 +0000
commit34f42c48d1fdabc4198ec57554652a5de2784927 (patch)
treea31f24276c56c3c04a003573a41c01ed368442b0 /sys/dev/ic
parent2e7693ff115858ab829cfeb57ae881e5f7e37e91 (diff)
simplify kthread_create(). no more stdarg
ok matthew guenther mikeb
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/aac.c4
-rw-r--r--sys/dev/ic/i82365.c7
-rw-r--r--sys/dev/ic/tcic2.c7
-rw-r--r--sys/dev/ic/twe.c4
4 files changed, 12 insertions, 10 deletions
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index 851cb0cb4c1..10c17978e05 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.57 2013/11/13 05:47:58 mlarkin Exp $ */
+/* $OpenBSD: aac.c,v 1.58 2013/11/18 20:21:51 deraadt Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -284,7 +284,7 @@ aac_create_thread(void *arg)
{
struct aac_softc *sc = arg;
- if (kthread_create(aac_command_thread, sc, &sc->aifthread, "%s",
+ if (kthread_create(aac_command_thread, sc, &sc->aifthread,
sc->aac_dev.dv_xname)) {
/* TODO disable aac */
printf("%s: failed to create kernel thread, disabled",
diff --git a/sys/dev/ic/i82365.c b/sys/dev/ic/i82365.c
index 47a30f2048c..ebb87061422 100644
--- a/sys/dev/ic/i82365.c
+++ b/sys/dev/ic/i82365.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365.c,v 1.29 2010/09/06 19:20:21 deraadt Exp $ */
+/* $OpenBSD: i82365.c,v 1.30 2013/11/18 20:21:51 deraadt Exp $ */
/* $NetBSD: i82365.c,v 1.10 1998/06/09 07:36:55 thorpej Exp $ */
/*
@@ -386,6 +386,7 @@ pcic_create_event_thread(arg)
void *arg;
{
struct pcic_handle *h = arg;
+ char name[MAXCOMLEN+1];
const char *cs;
switch (h->sock) {
@@ -405,8 +406,8 @@ pcic_create_event_thread(arg)
panic("pcic_create_event_thread: unknown pcic socket");
}
- if (kthread_create(pcic_event_thread, h, &h->event_thread,
- "%s,%s", h->ph_parent->dv_xname, cs)) {
+ snprintf(name, sizeof name, "%s,%s", h->ph_parent->dv_xname, cs);
+ if (kthread_create(pcic_event_thread, h, &h->event_thread, name)) {
printf("%s: unable to create event thread for sock 0x%02x\n",
h->ph_parent->dv_xname, h->sock);
panic("pcic_create_event_thread");
diff --git a/sys/dev/ic/tcic2.c b/sys/dev/ic/tcic2.c
index 67308e1b7fe..83742e3d39d 100644
--- a/sys/dev/ic/tcic2.c
+++ b/sys/dev/ic/tcic2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcic2.c,v 1.8 2007/11/25 16:40:04 jmc Exp $ */
+/* $OpenBSD: tcic2.c,v 1.9 2013/11/18 20:21:51 deraadt Exp $ */
/* $NetBSD: tcic2.c,v 1.3 2000/01/13 09:38:17 joda Exp $ */
#undef TCICDEBUG
@@ -446,6 +446,7 @@ tcic_create_event_thread(arg)
void *arg;
{
struct tcic_handle *h = arg;
+ char name[MAXCOMLEN+1];
const char *cs;
switch (h->sock) {
@@ -459,8 +460,8 @@ tcic_create_event_thread(arg)
panic("tcic_create_event_thread: unknown tcic socket");
}
- if (kthread_create(tcic_event_thread, h, &h->event_thread,
- "%s,%s", h->sc->dev.dv_xname, cs)) {
+ snprintf(name, sizeof name, "%s,%s", h->sc->dev.dv_xname, cs);
+ if (kthread_create(tcic_event_thread, h, &h->event_thread, name)) {
printf("%s: unable to create event thread for sock 0x%02x\n",
h->sc->dev.dv_xname, h->sock);
panic("tcic_create_event_thread");
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index d1aca481b44..a2ad3c3d0cc 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.41 2011/07/17 22:46:48 matthew Exp $ */
+/* $OpenBSD: twe.c,v 1.42 2013/11/18 20:21:51 deraadt Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -419,7 +419,7 @@ twe_thread_create(void *v)
struct twe_softc *sc = v;
if (kthread_create(twe_thread, sc, &sc->sc_thread,
- "%s", sc->sc_dev.dv_xname)) {
+ sc->sc_dev.dv_xname)) {
/* TODO disable twe */
printf("%s: failed to create kernel thread, disabled\n",
sc->sc_dev.dv_xname);