Commit b35413f4 authored by Alaa Mohamed's avatar Alaa Mohamed Committed by Tony Nguyen
Browse files

igb: Convert kmap() to kmap_local_page()



kmap() is being deprecated and these usages are all local to the thread
so there is no reason kmap_local_page() can't be used.

Replace kmap() calls with kmap_local_page().

Signed-off-by: default avatarAlaa Mohamed <eng.alaamohamedsoliman.am@gmail.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 833fbbbb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1798,14 +1798,14 @@ static int igb_check_lbtest_frame(struct igb_rx_buffer *rx_buffer,

	frame_size >>= 1;

	data = kmap(rx_buffer->page);
	data = kmap_local_page(rx_buffer->page);

	if (data[3] != 0xFF ||
	    data[frame_size + 10] != 0xBE ||
	    data[frame_size + 12] != 0xAF)
		match = false;

	kunmap(rx_buffer->page);
	kunmap_local(data);

	return match;
}