]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rts5208: Convert kmap() to kmap_local_page()
authorFabio M. De Francesco <fmdefrancesco@gmail.com>
Wed, 30 Mar 2022 14:33:31 +0000 (16:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 05:33:47 +0000 (07:33 +0200)
commit2dc872182e0eb1006c64ae5b90fdf92d46f673ad
tree55976285710883df8efc80afc912a4c2106f4e20
parenta1c89531843b5b718507b32ce2b5fc492553c4c0
staging: rts5208: Convert kmap() to kmap_local_page()

The use of kmap() is being deprecated in favor of kmap_local_page()
where it is feasible.

With kmap_local_page(), the mapping is per thread, CPU local and not
globally visible. Therefore rtsx_stor_access_xfer_buf() is a function
where the use of kmap_local_page() in place of kmap() is correctly
suited.

Convert to kmap_local_page() but, instead of open coding it, use the
helpers memcpy_to_page() and memcpy_from_page().

Make a minor change to a comment related to scatter-gather.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20220330143331.8306-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rts5208/rtsx_transport.c