i40e: redfine I40E_PHY_TYPE_MAX
authorMitch Williams <mitch.a.williams@intel.com>
Tue, 29 Aug 2017 09:32:33 +0000 (05:32 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 6 Oct 2017 15:11:31 +0000 (08:11 -0700)
commit60518a048919a2781e3192981d2946149240b837
tree702c5eb9f00e38e506acee9054946bb632388418
parentc3d26b75c22b0487c452bd610338aa015eae517b
i40e: redfine I40E_PHY_TYPE_MAX

Since I40E_PHY_TYPE_MAX is used as an iterator, usually combined with
some sort of bit-shifting, it should only include actual PHY types and
not error cases. Move it up in the enum declaration so that loops only
iterate across valid PHY types.

Signed-off-by: Mitch Williams <mitch.a.williams@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_adminq_cmd.h
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h