summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>2022-11-23 23:52:16 +0300
committerDavid S. Miller <davem@davemloft.net>2022-11-25 13:44:01 +0300
commitc191445874bba16a636a88fc4afc7c3ab09228fd (patch)
tree5f5cc756b7aff6261a8d2dbaf9f065c913da9ce4 /include
parentf61e6d3ca4dac83d7093e7be7ceabce95e738e68 (diff)
downloadlinux-c191445874bba16a636a88fc4afc7c3ab09228fd.tar.xz
cassini: Use page_address() instead of kmap_atomic()
Pages for Rx buffers are allocated in cas_page_alloc() using either GFP_ATOMIC or GFP_KERNEL. Memory allocated with GFP_KERNEL/GFP_ATOMIC can't come from highmem and so there's no need to kmap() them. Just use page_address() instead. This makes the variable 'addr' unnecessary, so remove it too. Note that kmap_atomic() disables preemption and page-fault processing, but page_address() doesn't. When removing uses of kmap_atomic(), one has to check if the code being executed between the map/unmap implicitly depends on page-faults and/or preemption being disabled. If yes, then code to disable page-faults and/or preemption should also be added for functional correctness. That however doesn't appear to be the case here, so just page_address() is used. I don't have hardware, so this change has only been compile tested. Cc: Ira Weiny <ira.weiny@intel.com> Cc: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions