[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061004120242.319a47e4.akpm@osdl.org>
Date:	Wed, 4 Oct 2006 12:02:42 -0700
From:	Andrew Morton <akpm@...l.org>
To:	Matthew Wilcox <matthew@....cx>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Must check what?
On Wed, 4 Oct 2006 12:37:53 -0600
Matthew Wilcox <matthew@....cx> wrote:
> 
> I'd like to propose that anyone adding __must_check markers in the
> future be forced to *WRITE SOME FUCKING DOCUMENTATION* about exactly
> what it is the caller is supposed to be checking.
> 
> extern int __must_check bus_register(struct bus_type * bus);
> 
I blame kernel-doc.  It should have a slot for documenting the return value,
but it doesn't, so nobody documents return values.
It should have a slot for documenting caller-provided locking requirements
too.  And for permissible calling-contexts.  They're all part of the
caller-provided environment, and these two tend to be a heck of a lot more
subtle than the function's formal arguments.
> Why, thank you.  Does it return 0 for success, or 1 on success?  Does it
> return an errno?
yes, no, yes ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
