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>] [day] [month] [year] [list]
Message-ID: <20210327095226.105039-1-chenlifu@huawei.com>
Date:   Sat, 27 Mar 2021 17:52:26 +0800
From:   Chen Lifu <chenlifu@...wei.com>
To:     <chenlifu@...wei.com>, Sekhar Nori <nsekhar@...com>,
        Russell King <linux@...linux.org.uk>
CC:     <heying24@...wei.com>, <yuehaibing@...wei.com>,
        <weiyongjun1@...wei.com>, <johnny.chenyi@...wei.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>
Subject: [PATCH -next] ARM: davinci: dm646x-evm: use DEFINE_SPINLOCK() for spinlock

From: Lifu Chen <chenlifu@...wei.com>

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Lifu Chen <chenlifu@...wei.com>
---
 arch/arm/mach-davinci/board-dm646x-evm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 952ddabc743e..a07b5f83a373 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -470,7 +470,7 @@ static struct davinci_i2c_platform_data i2c_pdata = {
 #define TVP5147_CH1		"tvp514x-1"
 
 /* spin lock for updating above registers */
-static spinlock_t vpif_reg_lock;
+static DEFINE_SPINLOCK(vpif_reg_lock);
 
 static int set_vpif_clock(int mux_mode, int hd)
 {
@@ -746,8 +746,6 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = {
 
 static void __init evm_init_video(void)
 {
-	spin_lock_init(&vpif_reg_lock);
-
 	dm646x_setup_vpif(&dm646x_vpif_display_config,
 			  &dm646x_vpif_capture_cfg);
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ