From: Krzysztof Halasa <khc@pm.waw.pl>
To: Jeff Garzik <jeff@garzik.org>
Cc: jeffrey.t.kirsher@intel.com, davem@davemloft.net,
Bruce Allan <bruce.w.allan@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com
Subject: Re: [net-next-2.6 04/15] e1000e: checkpatch error - open braces
Date: Sat, 25 Dec 2010 14:10:38 +0100 [thread overview]
Message-ID: <m3lj3eq9pt.fsf@intrepid.localdomain> (raw)
In-Reply-To: <4D15C77C.9030306@garzik.org> (Jeff Garzik's message of "Sat, 25 Dec 2010 05:29:16 -0500")
Jeff Garzik <jeff@garzik.org> writes:
>> ERROR: that open brace { should be on the previous line
>> -static const u16 e1000_gg82563_cable_length_table[] =
>> - { 0, 60, 115, 150, 150, 60, 115, 150, 180, 180, 0xFF };
>> - static const u32 test[] =
>> - {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};
> Gah, that looks worse than the unpatched code.
>
> I think this was an over-literal checkpatch interpretation. If you
> look at e.g. drivers/net/tg3.c, you see that longer tables have the
> trailing braces on a separate line, where they should be.
>
> IMO, the single-line cases should just be left as they are now in the
> source code.
I think so. Also I think it's a false positive - the above aren't the
typical
if()
{
xxx
}
They are instead single lines:
type var[] = {a, b, c, d};
broken into two to meet the (former) line length limit.
Makes me think that we should never break long lines in the code. This
is best left for the text editors and viewers (only while displaying).
--
Krzysztof Halasa
next prev parent reply other threads:[~2010-12-25 13:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-25 6:05 [net-next-2.6 00/15][pull-request] Intel Wired LAN Driver Update jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 01/15] Documentation/networking: Update Intel Wired LAN docs jeffrey.t.kirsher
2010-12-25 12:30 ` Ben Hutchings
2010-12-25 6:06 ` [net-next-2.6 02/15] e1000e: checkpatch error - macro panethesis jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 03/15] e1000e: checkpatch error - trailing statements jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 04/15] e1000e: checkpatch error - open braces jeffrey.t.kirsher
2010-12-25 10:29 ` Jeff Garzik
2010-12-25 13:10 ` Krzysztof Halasa [this message]
2010-12-25 6:06 ` [net-next-2.6 05/15] e1000e: checkpatch warnings - braces jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 06/15] igb: Fix overwrite of the VF's flags jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 07/15] igb: Warn on attempt to override administratively set MAC/VLAN jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 08/15] igb: Some fine tuning jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 09/15] igb: Add Anti-spoofing feature support jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 10/15] igbvf: force link checking when mailbox timeout has occurred jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 11/15] igbvf: add support for i350 VF device jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 12/15] ixgbe: Warn on VF attempt to override Administratively set MAC/VLAN jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 13/15] ixgbe: Add SR-IOV feature support to X540 jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 14/15] ixgbe: Add anti-spoofing feature support jeffrey.t.kirsher
2010-12-25 6:06 ` [net-next-2.6 15/15] ixgbevf: Add X540 VF device support to the ixgbevf driver jeffrey.t.kirsher
2010-12-25 6:35 ` [net-next-2.6 00/15][pull-request] Intel Wired LAN Driver Update Jeff Kirsher
2010-12-26 3:26 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3lj3eq9pt.fsf@intrepid.localdomain \
--to=khc@pm.waw.pl \
--cc=bphilips@novell.com \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeff@garzik.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox