lkml.org 
[lkml]   [2008]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] teach checkpatch.pl about list_for_each
On Thu, 03 Jan 2008 13:34:45 +0100
Tomas Carnecky <tom@dbservice.com> wrote:

> Christer Weinigel wrote:
> > By the way, what is the consensus on lines over 80 characters?
> > checkpatch complains about the following:
> >
> > WARNING: line over 80 characters
> > #762: FILE: drivers/spi/spi_s3c24xx_dma.c:720:
> > + printk(KERN_INFO "S3C24xx SPI DMA driver (c) 2007 Nordnav
> > Technologies AB\n");
> >
> > I can of course break this into:
> >
> > printk(KERN_INFO "S3C24xx SPI DMA driver (c) 2007 Nordnav "
> > "Technologies AB\n");
> >
> > but in my opinion that becomes more even unreadable. Would it be
> > possible to add a special case so that checkpatch ignores long
> > strings that go beyond 80 characters? Do you think it is a good
> > idea?
>
> At the top of the file add a #define and use that in the code? Some
> drivers define their version/author etc that way and then just
> printk(DRIVER_VERSION DRIVER_AUTHOR);

That only solves this specific problem. For debugging printks, which
often become quite wide, it would make the code even more unreadable to
add lots of defines just to keep things within 80 cols.

/Christer


\
 
 \ /
  Last update: 2008-01-04 00:13    [W:0.224 / U:0.112 seconds]
©2003-2011 Jasper Spaans. Advertise on this site