lkml.org 
[lkml]   [2008]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Merging of completely unreviewed drivers
    On Thu, Feb 21, 2008 at 11:31:44PM +0000, Alan Cox wrote:
    > On Fri, 22 Feb 2008 00:38:14 +0100
    > Krzysztof Halasa <khc@pm.waw.pl> wrote:
    >
    > > Linus Torvalds <torvalds@linux-foundation.org> 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



    \
     
     \ /
      Last update: 2008-02-22 01:35    [W:0.021 / U:1.664 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site