lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1481182978-64684-1-git-send-email-kirtika@chromium.org>
Date:   Wed,  7 Dec 2016 23:42:58 -0800
From:   Kirtika Ruchandani <kirtika@...omium.org>
To:     dan.j.williams@...el.com
Cc:     Kirtika Ruchandani <kirtika@...omium.org>, arnd@...db.de,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] memremap: Remove unused align_* variables

Commit eb7d78c9e7f6 introduced align_start, align_size and align_end
variables in pgmap_radix_release() but did not use them.
Compiling with W=1 gives the following harmless warning, fix it to
reduce the noise with W=1 in the kernel.

kernel/memremap.c: In function ‘pgmap_radix_release’:
kernel/memremap.c:199:48: warning: variable ‘align_end’ set but not used [-Wunused-but-set-variable]

The call to resource_size has no side-effects and is safe to remove.

Fixes: eb7d78c9e7f6 ("devm_memremap_pages: fix vmem_altmap lifetime + alignment handling")
Cc: Dan Williams <dan.j.williams@...el.com>
Signed-off-by: Kirtika Ruchandani <kirtika@...omium.org>
---
 kernel/memremap.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/kernel/memremap.c b/kernel/memremap.c
index b501e39..8dde681 100644
--- a/kernel/memremap.c
+++ b/kernel/memremap.c
@@ -196,11 +196,7 @@ EXPORT_SYMBOL(put_zone_device_page);

 static void pgmap_radix_release(struct resource *res)
 {
-	resource_size_t key, align_start, align_size, align_end;
-
-	align_start = res->start & ~(SECTION_SIZE - 1);
-	align_size = ALIGN(resource_size(res), SECTION_SIZE);
-	align_end = align_start + align_size - 1;
+	resource_size_t key;

	mutex_lock(&pgmap_lock);
	for (key = res->start; key <= res->end; key += SECTION_SIZE)
--
2.8.0.rc3.226.g39d4020

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ