net/ice/base: add macro specifying max NVM offset
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 23 Mar 2020 07:17:43 +0000 (15:17 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:05 +0000 (13:57 +0200)
commit9f041a72140c480fed178a743b7d327cba1031e8
tree7db171dec84f4781292e10fe4d094fd19eee894a
parent2516684aed7a4ea93391caefe8e2cdc486955a83
net/ice/base: add macro specifying max NVM offset

The ice_aq_read_nvm function uses a somewhat weird construction for
verifying that the incoming offset is valid. Replace this construction
with a simple greater-than expression, and define the maximum value
(24bits) in the ice_adminq_cmd.h

By providing a macro, the check becomes more clear. Additionally the
maximum offset can be used in other locations.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_adminq_cmd.h
drivers/net/ice/base/ice_nvm.c