]> git.baikalelectronics.ru Git - kernel.git/commit
fm10k: fix mis-ordered parameters in declaration for .ndo_set_vf_bw
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 11 Aug 2017 18:14:58 +0000 (11:14 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 3 Oct 2017 16:00:04 +0000 (09:00 -0700)
commitf47ae2b5a16045e869fc27d968063b4bcec90d69
tree34f7bd8ebc73723889f63e1880bcc55709679c97
parenta3387f6fd31e0eb4592da4412db173837a439c6b
fm10k: fix mis-ordered parameters in declaration for .ndo_set_vf_bw

We've had support for setting both a minimum and maximum bandwidth via
.ndo_set_vf_bw since commit 3d7ef5a2aae6 ("fm10k: Add support for SR-IOV
to driver", 2014-09-20).

Likely because we do not support minimum rates, the declaration
mis-ordered the "unused" parameter, which causes warnings when analyzed
with cppcheck.

Fix this warning by properly declaring the min_rate and max_rate
variables in the declaration and definition (rather than using
"unused"). Also rename "rate" to max_rate so as to clarify that we only
support setting the maximum rate.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k.h
drivers/net/ethernet/intel/fm10k/fm10k_iov.c