Re: [PATCH 7/9] scsi: megaraid_sas - Driver created the self work queue for OCR

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tomas Henzl
Date: Wednesday, December 1, 2010 - 5:19 am

On 11/30/2010 07:05 PM, Yang, Bo wrote:
+	megasas_ocr_wq = create_workqueue("megasas_ocr");
+
+	if ( !megasas_ocr_wq )
+		printk(KERN_DEBUG "megasas: Failed to create workqueue.\n");

Then why do you check the return value if it can not fail?

You are allocating a lot of resources in the init function and when some of them is not 
available (which is unlikely) you return with an error value. Why don't you want that for 
create_workqueue too?

Is it safe enter the suspend mode with the workqueue still doing some job?
Shouldn't be the workqueue flushed in the suspend function?
 


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 7/9] scsi: megaraid_sas - Driver created the se ..., Tomas Henzl, (Wed Dec 1, 5:19 am)