Re: [PATCH] Moorestown RAR Handler driver, MRST 2.6.31-rc3

From: Joe Perches
Date: Sat Aug 01 2009 - 04:03:43 EST


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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/