lkml.org 
[lkml]   [2009]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Moorestown RAR Handler driver, MRST 2.6.31-rc3
From
Date
On Sat, 2009-08-01 at 09:30 +0200, Sam Ravnborg wrote:
> > +#include "memrar_allocator.h"
> > +#include <linux/slab.h>
> > +#include <linux/bug.h>
>
> <linux/...> comes _before_ you own includes.

The use of pr_fmt might change this guideline.

> > + WARN(capacity < block_size * 2,
> > + "Memory allocator is only large enough to "
> > + "hold one block.\n");
>
> Try to avoid breaking your printable line.
> It is much easier to grep for the line when it is on a single
> line.
> If you violate the 80 chars per line rule do to this then accept
> that grepable lines is better than keeping them 80 or less wide.

Maybe it's better to ignore the indent guideline here as well.
An outdent might be preferable to having the line exceed 80 chars.

Maybe:
WARN(capacity < block_size * 2,
"Memory allocator is only large enough to hold one block.\n");
or
WARN(capacity < block_size * 2,
"Memory allocator is only large enough to hold one block.\n");

Any format string longer than 80 chars is likely a poor log entry.




\
 
 \ /
  Last update: 2009-08-01 10:05    [W:0.115 / U:0.376 seconds]
©2003-2014 Jasper Spaans. Advertise on this site