public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Complaint about return code convention in queue_work() etc.
@ 2006-08-18 21:39 Alan Stern
  2006-08-18 21:43 ` Jeff Garzik
  2006-08-20 11:06 ` Ingo Molnar
  0 siblings, 2 replies; 10+ messages in thread
From: Alan Stern @ 2006-08-18 21:39 UTC (permalink / raw)
  To: Kernel development list
  Cc: Ingo Molnar, Andrew Morton, David Woodhouse, Kai Petzke,
	Theodore Ts'o

I'd like to lodge a bitter complaint about the return codes used by 
queue_work() and related functions:

	Why do the damn things return 0 for error and 1 for success???
	Why don't they use negative error codes for failure, like 
	everything else in the kernel?!!

I've tripped over this at least twice, and on each occasion spent a
considerable length of time trying to track down the problem.

If nobody objects, I'll write a patch to change the convention for the
return values.  It doesn't matter how many places those routines are
called from; it'll be worth it.

Alan Stern


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-08-20 22:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-18 21:39 Complaint about return code convention in queue_work() etc Alan Stern
2006-08-18 21:43 ` Jeff Garzik
2006-08-18 22:41   ` Andrew Morton
2006-08-18 23:29   ` Alexey Dobriyan
2006-08-19 15:24     ` Alan Stern
2006-08-20  8:27       ` Jan Engelhardt
2006-08-20 16:58         ` Alan Stern
2006-08-20 22:06           ` Jan Engelhardt
2006-08-20 22:36             ` Alan Stern
2006-08-20 11:06 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox