[Intel-wired-lan] [PATCH] ixgbe: Make all unchanging ops structures const
Bowers, AndrewX
andrewx.bowers at intel.com
Tue Mar 1 17:14:33 UTC 2016
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Mark D Rustad
> Sent: Thursday, January 07, 2016 10:13 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH] ixgbe: Make all unchanging ops structures
> const
>
> The source for the ops structure contents are const, so make them so. Copy
> them in place with structure assignments instead of memcpys.
> Make the mbx_ops accessed by reference instead of making a copy of the
> source structure. Update copyright date on the touched files.
>
> Reported-by: Julia Lawall <Julia.Lawall at lip6.fr>
> Signed-off-by: Mark Rustad <mark.d.rustad at intel.com>
> ---
> Changes in V2:
> - Access mbx_ops by reference instead of copying the structure. Saves a
> little bloat.
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe.h | 12 ++++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 10 +++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 10 +++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 +++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c | 40 ++++++++++++--------
> ----
> drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h | 4 +-
> drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 12 ++++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 10 +++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 18 +++++------
> 9 files changed, 63 insertions(+), 63 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
Code changes correctly applied
More information about the Intel-wired-lan
mailing list