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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun,  3 Oct 2021 18:41:13 +0700
From:   Nghia Le <nghialm78@...il.com>
To:     mike.kravetz@...cle.com, akpm@...ux-foundation.org,
        nathan@...nel.org, ndesaulniers@...gle.com
Cc:     Nghia Le <nghialm78@...il.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        lukas.bulwahn@...il.com, kernel-janitors@...r.kernel.org
Subject: [PATCH] mm/hugetlb.c: remove dead store in demote_size_show()

The command "make clang-analyzer" detected a dead store.

Remove demote_size and corresponding assignment in function
demote_size_show() to fix dead store, as demote_size is never read.

Signed-off-by: Nghia Le <nghialm78@...il.com>
---
 mm/hugetlb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 993efa70bce4..ef00e6ad0f6a 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3706,11 +3706,9 @@ static ssize_t demote_size_show(struct kobject *kobj,
 					struct kobj_attribute *attr, char *buf)
 {
 	struct hstate *h;
-	unsigned long demote_size;
 	int nid;
 
 	h = kobj_to_hstate(kobj, &nid);
-	demote_size = h->demote_order;
 
 	return sysfs_emit(buf, "%lukB\n",
 			(unsigned long)(PAGE_SIZE << h->demote_order) / SZ_1K);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ