netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	davem@davemloft.net,
	Elizabeth Kappler <elizabeth.m.kappler@intel.com>
Cc: netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: Re: [net-next 04/15] i40e: add netdev ops helper function
Date: Thu, 12 Dec 2013 18:27:09 +0400	[thread overview]
Message-ID: <52A9C7BD.2010401@cogentembedded.com> (raw)
In-Reply-To: <1386852051-27907-5-git-send-email-jeffrey.t.kirsher@intel.com>

Hello.

On 12-12-2013 16:40, Jeff Kirsher wrote:

> From: Elizabeth Kappler <elizabeth.m.kappler@intel.com>

> Add a small helper function for assigning netdev_ops.
> trivial:
>    move include down
>    small nearby whitespace fixes for readablility

    Don't group unrelated changes in the different places of the file together 
into one patch please.

> Change-Id: Ib1c082a7bc9eedc1d3cfa5515720e4ef8f9f07cd
> Signed-off-by: Elizabeth Kappler <elizabeth.m.kappler@intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e.h      |  2 +-
>   drivers/net/ethernet/intel/i40e/i40e_main.c | 13 ++++++++++++-
>   2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
> index 001d7cf..385d3ff 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e.h
> @@ -43,13 +43,13 @@
>   #include <linux/in.h>
>   #include <linux/ip.h>
>   #include <linux/tcp.h>
> -#include <linux/sctp.h>
>   #include <linux/pkt_sched.h>
>   #include <linux/ipv6.h>
>   #include <net/checksum.h>
>   #include <net/ip6_checksum.h>
>   #include <linux/ethtool.h>
>   #include <linux/if_vlan.h>
> +#include <linux/sctp.h>

    Why?

> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 1ef311a..591a6e3 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -5849,6 +5849,15 @@ static const struct net_device_ops i40e_netdev_ops = {
>   };
>
>   /**
> + * i40e_assign_netdev_ops - Initialize netdev operations function pointers
> + * @dev: ptr to the netdev struct
> + **/

    Use a normal comment ending please, */.

> +static void i40e_assign_netdev_ops(struct net_device *dev)
> +{
> +	dev->netdev_ops = &i40e_netdev_ops;
> +}

    Frankly, I don't see much sense in such function. It only increases #LoC 
for no apparent reason.

> +
> +/**
>    * i40e_config_netdev - Setup the netdev flags
>    * @vsi: the VSI being configured
>    *
> @@ -5919,8 +5928,9 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
>   	/* Setup netdev TC information */
>   	i40e_vsi_config_netdev_tc(vsi, vsi->tc_config.enabled_tc);
>
> -	netdev->netdev_ops = &i40e_netdev_ops;
> +	i40e_assign_netdev_ops(netdev);
>   	netdev->watchdog_timeo = 5 * HZ;
> +
>   	i40e_set_ethtool_ops(netdev);
>
>   	return 0;
> @@ -7653,6 +7663,7 @@ static int __init i40e_init_module(void)
>   	pr_info("%s: %s - version %s\n", i40e_driver_name,
>   		i40e_driver_string, i40e_driver_version_str);
>   	pr_info("%s: %s\n", i40e_driver_name, i40e_copyright);
> +

    Unrelated whitespace change.

>   	i40e_dbg_init();
>   	return pci_register_driver(&i40e_driver);
>   }

WBR, Sergei

  reply	other threads:[~2013-12-12 14:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 12:40 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-12-12 12:40 ` [net-next 01/15] i40e: fix null dereference Jeff Kirsher
2013-12-12 14:30   ` Sergei Shtylyov
2013-12-12 12:40 ` [net-next 02/15] i40e: fix up some of the ethtool connection reporting Jeff Kirsher
2013-12-12 12:40 ` [net-next 03/15] i40e: fix pf reset after offline test Jeff Kirsher
2013-12-12 12:40 ` [net-next 04/15] i40e: add netdev ops helper function Jeff Kirsher
2013-12-12 14:27   ` Sergei Shtylyov [this message]
2013-12-12 12:40 ` [net-next 05/15] i40e: Tell the stack about our actual number of queues Jeff Kirsher
2013-12-12 12:40 ` [net-next 06/15] i40e: init flow control settings to disabled Jeff Kirsher
2013-12-12 12:40 ` [net-next 07/15] i40e: trivial fixes Jeff Kirsher
2013-12-12 12:40 ` [net-next 08/15] i40e: use same number of queues as CPUs Jeff Kirsher
2013-12-12 12:40 ` [net-next 09/15] i40e: reinit flow for the main VSI Jeff Kirsher
2013-12-12 12:40 ` [net-next 10/15] i40e: function to reconfigure RSS queues and rebuild Jeff Kirsher
2013-12-12 12:40 ` [net-next 11/15] i40e: debugfs command to change RSS queue count Jeff Kirsher
2013-12-12 14:13   ` Sergei Shtylyov
2013-12-12 20:41   ` Ben Hutchings
2013-12-12 12:40 ` [net-next 12/15] i40e: Add basic support for get/set channels for RSS Jeff Kirsher
2013-12-12 12:40 ` [net-next 13/15] i40e: rtnl_lock in reset path fixes Jeff Kirsher
2013-12-12 12:40 ` [net-next 14/15] i40e: support for suspend and resume Jeff Kirsher
2013-12-12 12:40 ` [net-next 15/15] i40e: Remove FCoE in i40e_virtchnl_pf.c code 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=52A9C7BD.2010401@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=elizabeth.m.kappler@intel.com \
    --cc=gospo@redhat.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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).