]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
igb: Make arrays on stack static const to avoid reallocation
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Fri, 6 Mar 2015 03:34:14 +0000 (03:34 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 6 Mar 2015 10:47:09 +0000 (02:47 -0800)
commitb23c0cc5e8b7c31f831c03b74f8e79c958c41d1e
treede13cc919a51a8a76687951fc09661dbf25e6608
parente357f0aae447009c053795e26a322fb15d3348a7
igb: Make arrays on stack static const to avoid reallocation

While addressing the pin problem I noticed that all of the pin register
values where having to be pushed onto the stack each time the function was
called.  To avoid that I am making them static const so that they should
only need to be allocated once and we can avoid all the instructions to get
them onto the stack..

size before:
   text    data     bss     dec     hex filename
 161477   10512       8  171997   29fdd drivers/net/ethernet/intel/igb/igb.ko

size after:
   text    data     bss     dec     hex filename
 161205   10512       8  171725   29ecd drivers/net/ethernet/intel/igb/igb.ko

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb_ptp.c