mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: Must check what?
Date: Wed, 4 Oct 2006 12:50:47 -0700	[thread overview]
Message-ID: <20061004125047.2c608dde.rdunlap@xenotime.net> (raw)
In-Reply-To: <20061004192537.GH28596@parisc-linux.org>

On Wed, 4 Oct 2006 13:25:37 -0600 Matthew Wilcox wrote:

> On Wed, Oct 04, 2006 at 12:02:42PM -0700, Andrew Morton wrote:
> > I blame kernel-doc.  It should have a slot for documenting the return value,
> > but it doesn't, so nobody documents return values.

Anyone can add what kernel-doc sees as a section.  Just use:

 * Returns:
 * and describe the return values.

> There's also the question about where the documentation should go.  By
> the function prototype in the header?  That's the easy place for people
> using the function to find it.  By the code?  That's the place where it
> stands the most chance (about 10%) of somebody bothering to update it
> when they change the code.

Good questions.  Jury is still out, I suppose.

> > 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.
> 
> Indeed.  And reference count assumptions.  It's almost like we want a
> pre-condition assertion ...

I want context documentation:
 * Context:
 * Interrupt or process or bh/softirq etc. (or Any)


---
~Randy

      parent reply	other threads:[~2006-10-04 19:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-04 18:37 Matthew Wilcox
2006-10-04 19:02 ` Andrew Morton
2006-10-04 19:25   ` Matthew Wilcox
2006-10-04 19:43     ` Andrew Morton
2006-10-04 20:58       ` Vadim Lobanov
2006-10-05 13:20         ` Helge Hafting
2006-10-05  3:47       ` Kyle Moffett
2006-10-04 19:50     ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061004125047.2c608dde.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®