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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1378258550.7347.52.camel@joe-AO722>
Date:	Tue, 03 Sep 2013 18:35:50 -0700
From:	Joe Perches <joe@...ches.com>
To:	"Nelson, Shannon" <shannon.nelson@...el.com>
Cc:	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>,
	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>,
	"e1000-devel@...ts.sourceforge.net" 
	<e1000-devel@...ts.sourceforge.net>
Subject: Re: [net-next v3 1/8] i40e: main driver core

On Wed, 2013-09-04 at 00:59 +0000, Nelson, Shannon wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@...ches.com]
[]
> Hi Joe,

Hi again.

> > > +/**
> > > + * i40e_get_netdev_stats_struct - Get statistics for netdev interface
> > > + * @netdev: network interface device structure
> > > + *
> > > + * Returns the address of the device statistics structure.
> > > + * The statistics are actually updated from the service task.
> > > + **/
> > > +static struct rtnl_link_stats64 *i40e_get_netdev_stats_struct(
> > > +					     struct net_device *netdev,
> > > +					     struct rtnl_link_stats64 *storage)
> > 
> > An alternative bsd declaration style might be
> > more readable for these very long types and names.
> > 
> > static struct rtnl_link_stats64 *
> > i40e_get_netdev_stats_struct(struct net_device *netdev,
> > 			     struct rtnl_link_stats64 *storage)
> 
> We're trying to stay consistent in kernel function styles, stay within
> standard checkpatch restrictions, and keep the code readable and
> maintainable, which all together make for some difficult choices.  No
> matter which way we go on some of these decisions, we run into the
> painfully gray opinion areas of how someone else might have solved the
> problems.

No worries.  Whatever you choose to do will be OK.

The BSD declaration style is pretty common in the
kernel tree too though.

Another thing would be to mark various arguments const struct
in the prototypes and declarations instead of just struct.

cheers, Joe

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ