On Thu, Feb 21, 2008 at 11:31:44PM +0000, Alan Cox wrote:
> On Fri, 22 Feb 2008 00:38:14 +0100
> Krzysztof Halasa <[EMAIL PROTECTED]> wrote:
> 
> > Linus Torvalds <[EMAIL PROTECTED]> writes:
> > 
> > > I'm personally of the opinion that a lot of checkpatch "fixes" are 
> > > anything but. That mainly concerns fixing overlong lines
> > 
> > Perhaps we should increase line length limit, 132 should be fine.
> > Especially useful with long printk() lines and long arithmetic
> > expressions.
> 
> Agreed. The fact I'm having to fix bugs introduced by incorrect printk
> wrapping confirms that for printk strings at least it is overzealous.
> 
> I'm all for it complaining about
> 
>   printk(KERN_FOO "<90 chars>", foo, bar + 37);
> 
> type bits when the foo, bar should be underneath to be visible but for
> straight quoted text too long it should not warn and try to get the text
> folded.

I think it should warn, but people have to be aware of the following:
- checkpatch errors are for stuff that really has to be fixed
- checkpatch warnings are for stuff that should be looked at
- the goal is not 0 checkpatch warnings but readable and bugfree code

A nice property of checkpatch is that it encourages to look closer at 
code like the following (it warns about the volatile):

                if (!netif_queue_stopped(netdev)) {
                        netif_stop_queue(netdev);
                        barrier();
                        if ((((((volatile 
u16)nesnic->sq_tail)+(nesnic->sq_size*2))-nesnic->sq_head) & (nesnic->sq_size - 
1)) != 1) {
                                netif_start_queue(netdev);
                                goto sq_no_longer_full;
                        }
                }

> Alan

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

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

Reply via email to