Skip to contentSkip to conversation

libertas: rename thread names

PATCH In review Holger Schurig 2 participants 3 messages Apr 30, 2008 – May 1, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libertas: rename thread names

* Most thread names start with "k", so we can do the same
* the module is named "libertas", so a "klibertas_XXX" thread name more self-describing
* one thread is a "struct task_struct", the other a workqueue, let this be reflected in the name

drivers/net/wireless/libertas/main.c +2 -3
Index: wireless-testing/drivers/net/wireless/libertas/main.c
===================================================================
@@ -1122,15 +1122,14 @@ struct lbs_private *lbs_add_card(void *c
 
 	priv->rtap_net_dev = NULL;
 
-	lbs_deb_thread("Starting main thread...\n");
 	init_waitqueue_head(&priv->waitq);
-	priv->main_thread = kthread_run(lbs_thread, dev, "lbs_main");
+	priv->main_thread = kthread_run(lbs_thread, dev, "klibertasd");
 	if (IS_ERR(priv->main_thread)) {
 		lbs_deb_thread("Error creating main thread.\n");
 		goto err_init_adapter;
 	}
 
-	priv->work_thread = create_singlethread_workqueue("lbs_worker");
+	priv->work_thread = create_singlethread_workqueue("klibertasq");
 	INIT_DELAYED_WORK(&priv->assoc_work, lbs_association_worker);
 	INIT_DELAYED_WORK(&priv->scan_work, lbs_scan_worker);
 	INIT_WORK(&priv->sync_channel, lbs_sync_channel_worker);
#1 lore raw
Quoted 5 lines · Holger Schurig

* Most thread names start with "k", so we can do the same
* the module is named "libertas", so a "klibertas_XXX" thread name more self-describing
* one thread is a "struct task_struct", the other a workqueue, let this be reflected in the name

It appears that of the other drivers that do something like this:

airo: uses device name
ipw2200: uses driver name (ipw2200)
iwlwifi: uses driver name (iwl3945)

I guess I'd rather go with those, seems odd to put a 'k' in front when it's a driver thread and not too many other drivers put a 'k' in front.

Dan

Quoted 24 lines

Index: wireless-testing/drivers/net/wireless/libertas/main.c
===================================================================

drivers/net/wireless/libertas/main.c +2 -3
@@ -1122,15 +1122,14 @@ struct lbs_private *lbs_add_card(void *c
 
 	priv->rtap_net_dev = NULL;
 
-	lbs_deb_thread("Starting main thread...\n");
 	init_waitqueue_head(&priv->waitq);
-	priv->main_thread = kthread_run(lbs_thread, dev, "lbs_main");
+	priv->main_thread = kthread_run(lbs_thread, dev, "klibertasd");
 	if (IS_ERR(priv->main_thread)) {
 		lbs_deb_thread("Error creating main thread.\n");
 		goto err_init_adapter;
 	}
 
-	priv->work_thread = create_singlethread_workqueue("lbs_worker");
+	priv->work_thread = create_singlethread_workqueue("klibertasq");
 	INIT_DELAYED_WORK(&priv->assoc_work, lbs_association_worker);
 	INIT_DELAYED_WORK(&priv->scan_work, lbs_scan_worker);
 	INIT_WORK(&priv->sync_channel, lbs_sync_channel_worker);
#2 lore raw
Quoted 2 lines

I guess I'd rather go with those, seems odd to put a 'k' in front when it's a driver thread and not too many other drivers put a 'k' in front.

Ok, it was cosmetic anyway.