[lkml]   [2001]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] documentation for mm.h
On Wed, 7 Mar 2001, Rik van Riel wrote:

> I've taken today to write some documentation for
> include/linux/mm.h, as used in 2.4.x

Mostly good.

> + pgprot_t vm_page_prot; /* Access permissions of this VMA. */

But a lot of the comments are trivial = deadweight. Comments are best used
for the bits that are magical without them, which should be few.

> + struct page *next_hash; /* Next page sharing our hash bucket in
> + the pagecache hash table. */

Multiline comments at the end of the line are hard to maintain and highly
susceptible to tab damage.

> + atomic_t count; /* Usage count, see below. */
> + unsigned long flags; /* atomic flags, some possibly
> + updated asynchronously */

I'm sure there's a good reason why the flags aren't atomic_t but this
comment would make me suspect a bug. Comments that don't agree with code
are worse than no comments.

"Love the dolphins," she advised him. "Write by W.A.S.T.E.."

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:29    [W:0.015 / U:11.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site