]> git.baikalelectronics.ru Git - kernel.git/commitdiff
igb: Convert kmap() to kmap_local_page()
authorAlaa Mohamed <eng.alaamohamedsoliman.am@gmail.com>
Tue, 19 Apr 2022 23:43:13 +0000 (01:43 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 5 May 2022 15:37:14 +0000 (08:37 -0700)
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: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igb/igb_ethtool.c

index 2a5782063f4c8bba2e9bc7a873523f5ef849f8bc..c14fc871dd417e8a03203d40aa3754279633e0a2 100644 (file)
@@ -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;
 }