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>] [day] [month] [year] [list]
Message-Id: <20211101030322.23532-1-hanyihao@vivo.com>
Date:   Sun, 31 Oct 2021 20:03:17 -0700
From:   Yihao Han <hanyihao@...o.com>
To:     "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
        Helge Deller <deller@....de>, Yihao Han <hanyihao@...o.com>,
        Christophe Leroy <christophe.leroy@....fr>,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        Sven Schnelle <svens@...ckframe.org>,
        linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     kernel@...o.com
Subject: [PATCH] parisc: using swap() instead of tmp

swap() was used instead of the tmp variable to swap values

Signed-off-by: Yihao Han <hanyihao@...o.com>
---
 arch/parisc/mm/init.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 65f50f072a87..1ae31db9988f 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -127,16 +127,12 @@ static void __init setup_bootmem(void)
 		int j;
 
 		for (j = i; j > 0; j--) {
-			physmem_range_t tmp;
-
 			if (pmem_ranges[j-1].start_pfn <
 			    pmem_ranges[j].start_pfn) {
 
 				break;
 			}
-			tmp = pmem_ranges[j-1];
-			pmem_ranges[j-1] = pmem_ranges[j];
-			pmem_ranges[j] = tmp;
+			swap(pmem_ranges[j-1], pmem_ranges[j]);
 		}
 	}
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ