Skip to contentSkip to conversation

scsi_queue_work() documented return value is incorrect

PATCH New Michael Reed 1 participant 1 message Aug 4, 2006 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi_queue_work() documented return value is incorrect

If you examine the queue_work() routine you'll see that it returns 1 on success, 0 if the work is already queued.

This patch corrects the source code documentation for the scsi_queue_work function.

Mike

Fix scsi_queue_work function documentation.

drivers/scsi/hosts.c +3 -1
@@ -487,7 +487,9 @@
  * @work:	Work to queue for execution.
  *
  * Return value:
- * 	0 on success / != 0 for error
+ * 	1 - work queued for execution
+ *	0 - work is already queued
+ *	-EINVAL - work queue doesn't exist
  **/
 int scsi_queue_work(struct Scsi_Host *shost, struct work_struct *work)
 {