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-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0grYbZ0WgRTvd++mdwcKWCp8UQVQK5aBHY-nD+XcayGEQ@mail.gmail.com>
Date:   Fri, 22 Jan 2021 16:24:08 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Zheng Yongjun <zhengyongjun3@...wei.com>
Cc:     Rafael Wysocki <rafael.j.wysocki@...el.com>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] pnp: pnpbios: Use DEFINE_SPINLOCK() for spinlock

On Mon, Dec 28, 2020 at 2:50 PM Zheng Yongjun <zhengyongjun3@...wei.com> wrote:
>
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
> ---
>  drivers/pnp/pnpbios/bioscalls.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
> index ba5cfc3dbe11..ddc6f2163c8e 100644
> --- a/drivers/pnp/pnpbios/bioscalls.c
> +++ b/drivers/pnp/pnpbios/bioscalls.c
> @@ -72,7 +72,7 @@ __visible u32 pnp_bios_fault_esp;
>  __visible u32 pnp_bios_fault_eip;
>  __visible u32 pnp_bios_is_utter_crap = 0;
>
> -static spinlock_t pnp_bios_lock;
> +static DEFINE_SPINLOCK(pnp_bios_lock);
>
>  /*
>   * Support Functions
> @@ -473,7 +473,6 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header)
>  {
>         int i;
>
> -       spin_lock_init(&pnp_bios_lock);
>         pnp_bios_callpoint.offset = header->fields.pm16offset;
>         pnp_bios_callpoint.segment = PNP_CS16;
>
> --

Applied as 5.12 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ