* [PATCH] mm/rmap: remove redundant variable cend
@ 2017-10-11 17:49 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-10-11 17:49 UTC (permalink / raw)
To: Andrew Morton, Kirill A . Shutemov, Minchan Kim, Johannes Weiner,
linux-mm
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable cend is set but never read, hence it is redundant and can be
removed.
Cleans up clang build warning: Value stored to 'cend' is never read
Fixes: 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
mm/rmap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index 787c07fb37dc..ffbea6a9e12d 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -899,7 +899,7 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
mmu_notifier_invalidate_range_start(vma->vm_mm, start, end);
while (page_vma_mapped_walk(&pvmw)) {
- unsigned long cstart, cend;
+ unsigned long cstart;
int ret = 0;
cstart = address = pvmw.address;
@@ -915,7 +915,6 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
entry = pte_wrprotect(entry);
entry = pte_mkclean(entry);
set_pte_at(vma->vm_mm, address, pte, entry);
- cend = cstart + PAGE_SIZE;
ret = 1;
} else {
#ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE
@@ -931,7 +930,6 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
entry = pmd_mkclean(entry);
set_pmd_at(vma->vm_mm, address, pmd, entry);
cstart &= PMD_MASK;
- cend = cstart + PMD_SIZE;
ret = 1;
#else
/* unexpected pmd-mapped page? */
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] mm/rmap: remove redundant variable cend
@ 2017-10-11 17:49 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-10-11 17:49 UTC (permalink / raw)
To: Andrew Morton, Kirill A . Shutemov, Minchan Kim, Johannes Weiner,
linux-mm
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable cend is set but never read, hence it is redundant and can be
removed.
Cleans up clang build warning: Value stored to 'cend' is never read
Fixes: 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
mm/rmap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index 787c07fb37dc..ffbea6a9e12d 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -899,7 +899,7 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
mmu_notifier_invalidate_range_start(vma->vm_mm, start, end);
while (page_vma_mapped_walk(&pvmw)) {
- unsigned long cstart, cend;
+ unsigned long cstart;
int ret = 0;
cstart = address = pvmw.address;
@@ -915,7 +915,6 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
entry = pte_wrprotect(entry);
entry = pte_mkclean(entry);
set_pte_at(vma->vm_mm, address, pte, entry);
- cend = cstart + PAGE_SIZE;
ret = 1;
} else {
#ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE
@@ -931,7 +930,6 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
entry = pmd_mkclean(entry);
set_pmd_at(vma->vm_mm, address, pmd, entry);
cstart &= PMD_MASK;
- cend = cstart + PMD_SIZE;
ret = 1;
#else
/* unexpected pmd-mapped page? */
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] mm/rmap: remove redundant variable cend
@ 2017-10-11 17:49 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-10-11 17:49 UTC (permalink / raw)
To: Andrew Morton, Kirill A . Shutemov, Minchan Kim, Johannes Weiner,
linux-mm
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable cend is set but never read, hence it is redundant and can be
removed.
Cleans up clang build warning: Value stored to 'cend' is never read
Fixes: 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
mm/rmap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index 787c07fb37dc..ffbea6a9e12d 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -899,7 +899,7 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
mmu_notifier_invalidate_range_start(vma->vm_mm, start, end);
while (page_vma_mapped_walk(&pvmw)) {
- unsigned long cstart, cend;
+ unsigned long cstart;
int ret = 0;
cstart = address = pvmw.address;
@@ -915,7 +915,6 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
entry = pte_wrprotect(entry);
entry = pte_mkclean(entry);
set_pte_at(vma->vm_mm, address, pte, entry);
- cend = cstart + PAGE_SIZE;
ret = 1;
} else {
#ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE
@@ -931,7 +930,6 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
entry = pmd_mkclean(entry);
set_pmd_at(vma->vm_mm, address, pmd, entry);
cstart &= PMD_MASK;
- cend = cstart + PMD_SIZE;
ret = 1;
#else
/* unexpected pmd-mapped page? */
--
2.14.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mm/rmap: remove redundant variable cend
2017-10-11 17:49 ` Colin King
(?)
@ 2017-10-17 11:26 ` Kirill A. Shutemov
-1 siblings, 0 replies; 6+ messages in thread
From: Kirill A. Shutemov @ 2017-10-17 11:26 UTC (permalink / raw)
To: Colin King
Cc: Andrew Morton, Kirill A . Shutemov, Minchan Kim, Johannes Weiner,
linux-mm, kernel-janitors, linux-kernel
On Wed, Oct 11, 2017 at 06:49:42PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable cend is set but never read, hence it is redundant and can be
> removed.
>
> Cleans up clang build warning: Value stored to 'cend' is never read
>
> Fixes: 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2")
I'm not sure if should consider warning fix as a fix. :)
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
--
Kirill A. Shutemov
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm/rmap: remove redundant variable cend
@ 2017-10-17 11:26 ` Kirill A. Shutemov
0 siblings, 0 replies; 6+ messages in thread
From: Kirill A. Shutemov @ 2017-10-17 11:26 UTC (permalink / raw)
To: Colin King
Cc: Andrew Morton, Kirill A . Shutemov, Minchan Kim, Johannes Weiner,
linux-mm, kernel-janitors, linux-kernel
On Wed, Oct 11, 2017 at 06:49:42PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable cend is set but never read, hence it is redundant and can be
> removed.
>
> Cleans up clang build warning: Value stored to 'cend' is never read
>
> Fixes: 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2")
I'm not sure if should consider warning fix as a fix. :)
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
--
Kirill A. Shutemov
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mm/rmap: remove redundant variable cend
@ 2017-10-17 11:26 ` Kirill A. Shutemov
0 siblings, 0 replies; 6+ messages in thread
From: Kirill A. Shutemov @ 2017-10-17 11:26 UTC (permalink / raw)
To: Colin King
Cc: Andrew Morton, Kirill A . Shutemov, Minchan Kim, Johannes Weiner,
linux-mm, kernel-janitors, linux-kernel
On Wed, Oct 11, 2017 at 06:49:42PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable cend is set but never read, hence it is redundant and can be
> removed.
>
> Cleans up clang build warning: Value stored to 'cend' is never read
>
> Fixes: 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2")
I'm not sure if should consider warning fix as a fix. :)
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
--
Kirill A. Shutemov
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-10-17 11:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 17:49 [PATCH] mm/rmap: remove redundant variable cend Colin King
2017-10-11 17:49 ` Colin King
2017-10-11 17:49 ` Colin King
2017-10-17 11:26 ` Kirill A. Shutemov
2017-10-17 11:26 ` Kirill A. Shutemov
2017-10-17 11:26 ` Kirill A. Shutemov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.