Skip to content

Commit 5b70e4a

Browse files
JuliaLawallJeff Kirsher
authored andcommitted
igb: constify e1000_phy_operations structure
This e1000_phy_operations structure is never modified, so declare it as const. Other structures of this type are already const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent b72f3f7 commit 5b70e4a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/ethernet/intel/igb/e1000_82575.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2920,7 +2920,7 @@ static struct e1000_mac_operations e1000_mac_ops_82575 = {
29202920
#endif
29212921
};
29222922

2923-
static struct e1000_phy_operations e1000_phy_ops_82575 = {
2923+
static const struct e1000_phy_operations e1000_phy_ops_82575 = {
29242924
.acquire = igb_acquire_phy_82575,
29252925
.get_cfg_done = igb_get_cfg_done_82575,
29262926
.release = igb_release_phy_82575,

drivers/net/ethernet/intel/igb/e1000_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ struct e1000_thermal_sensor_data {
372372
struct e1000_info {
373373
s32 (*get_invariants)(struct e1000_hw *);
374374
struct e1000_mac_operations *mac_ops;
375-
struct e1000_phy_operations *phy_ops;
375+
const struct e1000_phy_operations *phy_ops;
376376
struct e1000_nvm_operations *nvm_ops;
377377
};
378378

0 commit comments

Comments
 (0)