Commit 3949c4ac authored by Julia Lawall's avatar Julia Lawall Committed by Jeff Kirsher

i40e: constify i40e_client_ops structure

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

Done with the help of Coccinelle.
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent ce927db4
...@@ -1863,7 +1863,7 @@ static enum i40iw_status_code i40iw_virtchnl_send(struct i40iw_sc_dev *dev, ...@@ -1863,7 +1863,7 @@ static enum i40iw_status_code i40iw_virtchnl_send(struct i40iw_sc_dev *dev,
} }
/* client interface functions */ /* client interface functions */
static struct i40e_client_ops i40e_ops = { static const struct i40e_client_ops i40e_ops = {
.open = i40iw_open, .open = i40iw_open,
.close = i40iw_close, .close = i40iw_close,
.l2_param_change = i40iw_l2param_change, .l2_param_change = i40iw_l2param_change,
......
...@@ -217,7 +217,7 @@ struct i40e_client { ...@@ -217,7 +217,7 @@ struct i40e_client {
#define I40E_CLIENT_FLAGS_LAUNCH_ON_PROBE BIT(0) #define I40E_CLIENT_FLAGS_LAUNCH_ON_PROBE BIT(0)
#define I40E_TX_FLAGS_NOTIFY_OTHER_EVENTS BIT(2) #define I40E_TX_FLAGS_NOTIFY_OTHER_EVENTS BIT(2)
enum i40e_client_type type; 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) static inline bool i40e_client_is_registered(struct i40e_client *client)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment