lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <4D15C77C.9030306@garzik.org> Date: Sat, 25 Dec 2010 05:29:16 -0500 From: Jeff Garzik <jeff@...zik.org> To: jeffrey.t.kirsher@...el.com CC: davem@...emloft.net, Bruce Allan <bruce.w.allan@...el.com>, netdev@...r.kernel.org, gospo@...hat.com, bphilips@...ell.com Subject: Re: [net-next-2.6 04/15] e1000e: checkpatch error - open braces On 12/25/2010 01:06 AM, jeffrey.t.kirsher@...el.com wrote: > From: Bruce Allan<bruce.w.allan@...el.com> > > ERROR: that open brace { should be on the previous line > > Signed-off-by: Bruce Allan<bruce.w.allan@...el.com> > Tested-by: Emil Tantilov<emil.s.tantilov@...el.com> > Signed-off-by: Jeff Kirsher<jeffrey.t.kirsher@...el.com> > --- > drivers/net/e1000e/es2lan.c | 4 ++-- > drivers/net/e1000e/ethtool.c | 4 ++-- > drivers/net/e1000e/phy.c | 22 +++++++++++----------- > 3 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c > index 79da646..b18c644 100644 > --- a/drivers/net/e1000e/es2lan.c > +++ b/drivers/net/e1000e/es2lan.c > @@ -100,8 +100,8 @@ > * with a lower bound at "index" and the upper bound at > * "index + 5". > */ > -static const u16 e1000_gg82563_cable_length_table[] = > - { 0, 60, 115, 150, 150, 60, 115, 150, 180, 180, 0xFF }; > +static const u16 e1000_gg82563_cable_length_table[] = { > + 0, 60, 115, 150, 150, 60, 115, 150, 180, 180, 0xFF }; > #define GG82563_CABLE_LENGTH_TABLE_SIZE \ > ARRAY_SIZE(e1000_gg82563_cable_length_table) > > diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c > index 15c6330..affcacf 100644 > --- a/drivers/net/e1000e/ethtool.c > +++ b/drivers/net/e1000e/ethtool.c > @@ -753,8 +753,8 @@ static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data, > int reg, int offset, u32 mask, u32 write) > { > u32 pat, val; > - static const u32 test[] = > - {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; > + static const u32 test[] = { > + 0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; > for (pat = 0; pat< ARRAY_SIZE(test); pat++) { > E1000_WRITE_REG_ARRAY(&adapter->hw, reg, offset, > (test[pat]& write)); 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. Jeff -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists