]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: use a local variable instead of calculating multiple times
authorLihong Yang <lihong.yang@intel.com>
Thu, 7 Sep 2017 12:05:56 +0000 (08:05 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 9 Oct 2017 21:38:04 +0000 (14:38 -0700)
commitdc86494afcda84b9128219da86e6f61bb34e55f4
tree6e80864541c7d0237388570a9716e605b5099463
parentf0135ad7ff345999e4e478f35570611288cb0078
i40e: use a local variable instead of calculating multiple times

The computed result of I40E_MAX_VSI_QP * I40E_VIRTCHNL_SUPPORTED_QTYPES
is used more than three times in function i40e_config_irq_link_list.
Simply declare a local variable to store it to improve readability.

Signed-off-by: Lihong Yang <lihong.yang@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c