On Tue, 2014-07-01 at 21:49 -0700, Florian Fainelli wrote:
> 2014-07-01 21:40 GMT-07:00 Joe Perches <j...@perches.com>:
> > On Tue, 2014-07-01 at 21:20 -0700, Florian Fainelli wrote:
> >> Hi,
> >>
> >> 2014-07-01 20:31 GMT-07:00 Varka Bhadram <varkabhad...@gmail.com>:
> >> > This patch fixed the coding style issues reported by checkpatch.pl
> >> >
> >> > following issues fixed:
> >> >         CHECK: Alignment should match open parenthesis
> >>
> >> It seems to me like checkpatch.pl should have a special case for
> >> networking code and that specific condition because fixing things to
> >> make checkpatch.pl happy seems not to agree with the general coding
> >> style recommended and enforced in the networking code.
> >
> > In networking (net/ and drivers/net) alignment of multiline statements
> > _should_ align to the open parenthesis and checkpatch already has a
> > specific check for those directories.
> >
> >> I just saw that new warning added popping up on a bunch of drivers
> >> that were properly fixed to match the networking coding style before
> >> submission.
> >
> > Is there anything you want changed in checkpatch?
> > If so, why?
> 
> It looks to me like it does some improper flagging when the multi-line
> statements are aligned to the closest tab after the opening
> parenthesis, e.g:
> 
> CHECK: Alignment should match open parenthesis
> #84: FILE: drivers/net/ethernet/broadcom/bcmsysport.c:84:
> +       __raw_writel(upper_32_bits(addr) & DESC_ADDR_HI_MASK,
> +                       d + DESC_ADDR_HI_STATUS_LEN);
> 
> gmail will probably render this incorrectly and does replace tabs with
> spaces, but if you run the script manually on that specific file, it
> will return some (false?) positives matches.
> 
> this is with checkpath.pl from net-next/master at
> 763e0ecd72fe90fdd73bb1aa1b72caf8381d2fff ("bonding: allow to add vlans
> on top of empty bond")

No, it's not a false positive.

The code is currently:

        __raw_writel(upper_32_bits(addr) & DESC_ADDR_HI_MASK,
                        d + DESC_ADDR_HI_STATUS_LEN);

1st line has 1 leading tab,
2nd line has 3 leading tabs

For networking code style, this should be:

        __raw_writel(upper_32_bits(addr) & DESC_ADDR_HI_MASK,
                     d + DESC_ADDR_HI_STATUS_LEN);

1st line has 1 leading tab,
2nd line has 2 leading tabs followed by 5 leading spaces

This aligns the 2nd line arguments to the position immediately
after the open parenthesis.



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to