fm10k: reduce the scope of the local msg variable
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 8 Jul 2019 23:12:26 +0000 (16:12 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 1 Aug 2019 21:57:38 +0000 (14:57 -0700)
commit71974d7e8556860c5ebe9bb37d598975f1e0c4e3
tree561a46b40372bed6f263de172f6e2d25b120a9b3
parentd56b47791d3464178be2aa2d61db694331d50d5a
fm10k: reduce the scope of the local msg variable

The msg variable in the fm10k_mbx_validate_msg_size and
fm10k_sm_mbx_transmit functions is only used within the do {} loop
scope. Reduce its scope only to where it is used.

This was detected by cppcheck, and resolves the following warnings
produced by that tool:

[fm10k_mbx.c:299]: (style) The scope of the variable 'msg' can be reduced.
[fm10k_mbx.c:2004]: (style) The scope of the variable 'msg' can be reduced.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_mbx.c