netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Nelson, Shannon" <shannon.nelson@intel.com>
Cc: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"gospo@redhat.com" <gospo@redhat.com>,
	"sassmann@redhat.com" <sassmann@redhat.com>,
	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@intel.com>,
	"e1000-devel@lists.sourceforge.net"
	<e1000-devel@lists.sourceforge.net>
Subject: Re: [net-next v3 1/8] i40e: main driver core
Date: Tue, 03 Sep 2013 18:35:50 -0700	[thread overview]
Message-ID: <1378258550.7347.52.camel@joe-AO722> (raw)
In-Reply-To: <FC41C24E35F18A40888AACA1A36F3E416C61C0CE@FMSMSX102.amr.corp.intel.com>

On Wed, 2013-09-04 at 00:59 +0000, Nelson, Shannon wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@perches.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

  reply	other threads:[~2013-09-04  1:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 12:38 [net-next v3 0/8][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-08-30 12:39 ` [net-next v3 1/8] i40e: main driver core Jeff Kirsher
2013-08-30 16:32   ` Joe Perches
2013-08-30 18:10     ` Stephen Hemminger
2013-08-30 18:40       ` David Miller
2013-08-30 19:19         ` Joe Perches
2013-09-04  0:59     ` Nelson, Shannon
2013-09-04  1:35       ` Joe Perches [this message]
2013-08-30 12:39 ` [net-next v3 2/8] i40e: transmit, receive, and napi Jeff Kirsher
2013-08-30 12:39 ` [net-next v3 3/8] i40e: driver ethtool core Jeff Kirsher
2013-08-30 12:39 ` [net-next v3 4/8] i40e: driver core headers Jeff Kirsher
2013-08-30 12:39 ` [net-next v3 5/8] i40e: implement virtual device interface Jeff Kirsher
2013-08-30 12:39 ` [net-next v3 6/8] i40e: init code and hardware support Jeff Kirsher
2013-08-30 12:39 ` [net-next v3 7/8] i40e: sysfs and debugfs interfaces Jeff Kirsher
2013-08-30 12:39 ` [net-next v3 8/8] i40e: include i40e in kernel proper Jeff Kirsher

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=1378258550.7347.52.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=gospo@redhat.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.com \
    --cc=sassmann@redhat.com \
    --cc=shannon.nelson@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).