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: <20220508022312.93905-1-wangborong@cdjrlc.com>
Date:   Sun,  8 May 2022 10:23:12 +0800
From:   Jason Wang <wangborong@...rlc.com>
To:     mark.rutland@....com
Cc:     will@...nel.org, catalin.marinas@....com, peterz@...radead.org,
        mingo@...hat.com, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
        namhyung@...nel.org, linux-arm-kernel@...ts.infradead.org,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jason Wang <wangborong@...rlc.com>
Subject: [PATCH] arm64: perf: no need to initialise statics to 0

Static variables do not need to be initialised to 0, because compiler
will initialise all uninitialised statics to 0. Thus, remove the
unneeded initializations.

Signed-off-by: Jason Wang <wangborong@...rlc.com>
---
 arch/arm64/kernel/perf_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index cb69ff1e6138..919fdcf8fce6 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -1226,7 +1226,7 @@ static struct ctl_table armv8_pmu_sysctl_table[] = {
 
 static void armv8_pmu_register_sysctl_table(void)
 {
-	static u32 tbl_registered = 0;
+	static u32 tbl_registered;
 
 	if (!cmpxchg_relaxed(&tbl_registered, 0, 1))
 		register_sysctl("kernel", armv8_pmu_sysctl_table);
-- 
2.35.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ