Since we have a new helper, let's replace open coded variant by it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Cc: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx> Cc: Sylwia Wnuczko <sylwia.wnuczko@xxxxxxxxx> --- v2: new patch drivers/net/ethernet/intel/i40e/i40e_nvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c index 7164f4ad8120..154505f352bc 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c +++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c @@ -444,7 +444,6 @@ static i40e_status i40e_read_nvm_buffer_aq(struct i40e_hw *hw, u16 offset, u16 read_size; bool last_cmd = false; u16 words_read = 0; - u16 i = 0; do { /* Calculate number of bytes we should read in this step. @@ -475,8 +474,7 @@ static i40e_status i40e_read_nvm_buffer_aq(struct i40e_hw *hw, u16 offset, offset += read_size; } while (words_read < *words); - for (i = 0; i < *words; i++) - data[i] = le16_to_cpu(((__le16 *)data)[i]); + le16_to_cpu_array(data, data, *words); read_nvm_buffer_aq_exit: *words = words_read; -- 2.28.0