Skip to content

Commit

Permalink
i40e: constify i40e_client_ops structure
Browse files Browse the repository at this point in the history
The i40e_client_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
  • Loading branch information
JuliaLawall authored and Jeff Kirsher committed May 6, 2016
1 parent ce927db commit 3949c4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/i40iw/i40iw_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/i40e/i40e_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3949c4a

Please sign in to comment.