[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220419234328.10346-1-eng.alaamohamedsoliman.am@gmail.com>
Date: Wed, 20 Apr 2022 01:43:28 +0200
From: Alaa Mohamed <eng.alaamohamedsoliman.am@...il.com>
To: outreachy@...ts.linux.dev
Cc: boris.ostrovsky@...cle.com, jgross@...e.com,
sstabellini@...nel.org, xen-devel@...ts.xenproject.org,
linux-kernel@...r.kernel.org, ira.weiny@...el.com,
eng.alaamohamedsoliman.am@...il.com
Subject: [PATCH v2] xen: 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: Alaa Mohamed <eng.alaamohamedsoliman.am@...il.com>
---
changes in V2:
-edit commit subject
-edit commit message
---
drivers/xen/gntalloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c
index 4849f94372a4..55acb32842a3 100644
--- a/drivers/xen/gntalloc.c
+++ b/drivers/xen/gntalloc.c
@@ -178,9 +178,9 @@ static void __del_gref(struct gntalloc_gref *gref)
unsigned long addr;
if (gref->notify.flags & UNMAP_NOTIFY_CLEAR_BYTE) {
- uint8_t *tmp = kmap(gref->page);
+ uint8_t *tmp = kmap_local_page(gref->page);
tmp[gref->notify.pgoff] = 0;
- kunmap(gref->page);
+ kunmap_local(tmp);
}
if (gref->notify.flags & UNMAP_NOTIFY_SEND_EVENT) {
notify_remote_via_evtchn(gref->notify.event);
--
2.35.2
Powered by blists - more mailing lists