From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [patch] eventfd - revised interface and cleanups (2nd rev) Date: Tue, 23 Jun 2009 14:46:38 -0700 Message-ID: <20090623144638.22ca61ea.akpm@linux-foundation.org> References: <20090623131848.b876d42e.akpm@linux-foundation.org> <20090623142909.42776e75.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, avi@redhat.com, kvm@vger.kernel.org, ghaskins@novell.com, rusty@rustcorp.com.au, bcrl@kvack.org To: Davide Libenzi Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:51207 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbZFWVrF (ORCPT ); Tue, 23 Jun 2009 17:47:05 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 23 Jun 2009 14:34:50 -0700 (PDT) Davide Libenzi wrote: > On Tue, 23 Jun 2009, Andrew Morton wrote: > > > > Should functions be describing all the returned error codes, ala man pages? > > > > > > > I think so. > > This becomes pretty painful when the function calls other functions, for > which just relays the error code. > Should we be just documenting the error codes introduced by the function > code, and say that the function returns errors A, B, C plus all the ones > returned by the called functions X, Y, Z? > If not, it becomes hell in maintaining the comments... Well. Don't worry about making rules. Taste and common sense apply. "Will it be useful to readers if I explicitly document the return value". If "yes" then document away. If "no" then don't.