Skip to content

constify various _ops structures for net-next-dave-git-a252e7

[email protected] lkml netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Changelog from the cover letter

----------

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Constify struct e1000_mac_operations 2.6.32-git-a252e7 v2drivers/net/e1000e/82571.c drivers/net/e1000e/e1000.h drivers/net/e1000e/es2lan.c +5 more+11 -60 replies
2/3Constify struct e1000_phy_operations 2.6.32-git-a252e7 v2drivers/net/e1000e/82571.c drivers/net/e1000e/e1000.h drivers/net/e1000e/es2lan.c +4 more+9 -70 replies
3/3Constify struct e1000_nvm_operations 2.6.32-git-a252e7 v2drivers/net/e1000e/82571.c drivers/net/e1000e/e1000.h drivers/net/e1000e/es2lan.c +4 more+15 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] constify various _ops structures for net-next-dave-git-a252e7

From: Emese Revfy <[email protected]>

Hello everyone!

The following patch series attempts to constify several structures that hold function pointers. This is only the initial batch, there are other candidate structures, some of which can probably be constified as well, I plan to submit them in the future.

The list of constified structures in this series:
e1000_mac_operations
e1000_phy_operations
e1000_nvm_operations

There are certain exceptions where a given instance of the structure cannot be const, they are marked with a comment in the patch.

The patches compile fine with an allyesconfig kernel on i386 and x86_64.

Please let me know if any of these structures should not be constified and any other issues you see with them.

Changelog:
----------
v1 -> v2
- updated to net-next-dave-git-a252e7
- extended comments with a reference to code that prevents constification

Thanks,
Emese

 drivers/net/e1000e/82571.c    |   11 ++++++-----
 drivers/net/e1000e/e1000.h    |    6 +++---
 drivers/net/e1000e/es2lan.c   |    7 ++++---
 drivers/net/e1000e/hw.h       |   18 ++++++++++--------
 drivers/net/e1000e/ich8lan.c  |    6 +++---
 drivers/net/igb/e1000_82575.c |    6 +++---
 drivers/net/igb/e1000_hw.h    |    7 +++++--
 drivers/net/igbvf/vf.h        |    1 +
 8 files changed, 35 insertions(+), 27 deletions(-)