netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Julia Lawall <julia.lawall@lip6.fr>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Julia Lawall <Julia.Lawall@lip6.fr>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 11/11] i40e: constify i40e_client_ops structure
Date: Fri,  6 May 2016 00:03:48 -0700	[thread overview]
Message-ID: <1462518228-30527-12-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1462518228-30527-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Julia Lawall <julia.lawall@lip6.fr>

The i40e_client_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/infiniband/hw/i40iw/i40iw_main.c      | 2 +-
 drivers/net/ethernet/intel/i40e/i40e_client.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c
index 90e5af2..e41fae24 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_main.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
@@ -1863,7 +1863,7 @@ static enum i40iw_status_code i40iw_virtchnl_send(struct i40iw_sc_dev *dev,
 }
 
 /* client interface functions */
-static struct i40e_client_ops i40e_ops = {
+static const struct i40e_client_ops i40e_ops = {
 	.open = i40iw_open,
 	.close = i40iw_close,
 	.l2_param_change = i40iw_l2param_change,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.h b/drivers/net/ethernet/intel/i40e/i40e_client.h
index bf6b453..a4601d9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_client.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_client.h
@@ -217,7 +217,7 @@ struct i40e_client {
 #define I40E_CLIENT_FLAGS_LAUNCH_ON_PROBE	BIT(0)
 #define I40E_TX_FLAGS_NOTIFY_OTHER_EVENTS	BIT(2)
 	enum i40e_client_type type;
-	struct i40e_client_ops *ops;	/* client ops provided by the client */
+	const struct i40e_client_ops *ops; /* client ops provided by the client */
 };
 
 static inline bool i40e_client_is_registered(struct i40e_client *client)
-- 
2.5.5

  parent reply	other threads:[~2016-05-06  7:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06  7:03 [net-next 00/11][pull request] 40GbE Intel Wired LAN Driver Updates 2016-05-05 Jeff Kirsher
2016-05-06  7:03 ` [net-next 01/11] i40e/i40evf: Refactor tunnel interpretation Jeff Kirsher
2016-05-06  7:03 ` [net-next 02/11] i40e: Drop packet split receive routine Jeff Kirsher
2016-05-06  7:03 ` [net-next 03/11] i40e/i40evf: Remove reference to ring->dtype Jeff Kirsher
2016-05-06  7:03 ` [net-next 04/11] i40e: Refactor receive routine Jeff Kirsher
2016-05-06  7:03 ` [net-next 05/11] i40evf: Drop packet split " Jeff Kirsher
2016-05-06  7:03 ` [net-next 06/11] i40evf: refactor " Jeff Kirsher
2016-05-06  7:03 ` [net-next 07/11] i40e/i40evf: Remove unused hardware receive descriptor code Jeff Kirsher
2016-05-06  7:03 ` [net-next 08/11] i40evf: Allocate Rx buffers properly Jeff Kirsher
2016-05-06  7:03 ` [net-next 09/11] i40e: Test memory before ethtool alloc succeeds Jeff Kirsher
2016-05-06  7:03 ` [net-next 10/11] i40e: fix misleading indentation Jeff Kirsher
2016-05-06  7:03 ` Jeff Kirsher [this message]
2016-05-06 19:55 ` [net-next 00/11][pull request] 40GbE Intel Wired LAN Driver Updates 2016-05-05 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=1462518228-30527-12-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=julia.lawall@lip6.fr \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --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).