Skip to content

Commit

Permalink
drivers: net: xgene: constify xgene_cle_ops structure
Browse files Browse the repository at this point in the history
The xgene_cle_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>
Acked-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julia Lawall authored and David S. Miller committed May 3, 2016
1 parent 9d18562 commit b555a3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/apm/xgene/xgene_enet_cle.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,6 @@ static int xgene_enet_cle_init(struct xgene_enet_pdata *pdata)
return xgene_cle_setup_ptree(pdata, enet_cle);
}

struct xgene_cle_ops xgene_cle3in_ops = {
const struct xgene_cle_ops xgene_cle3in_ops = {
.cle_init = xgene_enet_cle_init,
};
2 changes: 1 addition & 1 deletion drivers/net/ethernet/apm/xgene/xgene_enet_cle.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,6 @@ struct xgene_enet_cle {
u32 jump_bytes;
};

extern struct xgene_cle_ops xgene_cle3in_ops;
extern const struct xgene_cle_ops xgene_cle3in_ops;

#endif /* __XGENE_ENET_CLE_H__ */
2 changes: 1 addition & 1 deletion drivers/net/ethernet/apm/xgene/xgene_enet_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ struct xgene_enet_pdata {
const struct xgene_mac_ops *mac_ops;
const struct xgene_port_ops *port_ops;
struct xgene_ring_ops *ring_ops;
struct xgene_cle_ops *cle_ops;
const struct xgene_cle_ops *cle_ops;
struct delayed_work link_work;
u32 port_id;
u8 cpu_bufnum;
Expand Down

0 comments on commit b555a3d

Please sign in to comment.