From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Zheng Yongjun <zhengyongjun3@huawei.com>
Cc: Rafael Wysocki <rafael.j.wysocki@intel.com>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] pnp: pnpbios: Use DEFINE_SPINLOCK() for spinlock
Date: Fri, 22 Jan 2021 16:24:08 +0100 [thread overview]
Message-ID: <CAJZ5v0grYbZ0WgRTvd++mdwcKWCp8UQVQK5aBHY-nD+XcayGEQ@mail.gmail.com> (raw)
In-Reply-To: <20201228135026.28343-1-zhengyongjun3@huawei.com>
On Mon, Dec 28, 2020 at 2:50 PM Zheng Yongjun <zhengyongjun3@huawei.com> wrote:
>
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.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!
prev parent reply other threads:[~2021-01-22 15:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 13:50 [PATCH -next] pnp: pnpbios: Use DEFINE_SPINLOCK() for spinlock Zheng Yongjun
2021-01-22 15:24 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJZ5v0grYbZ0WgRTvd++mdwcKWCp8UQVQK5aBHY-nD+XcayGEQ@mail.gmail.com \
--to=rafael@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=zhengyongjun3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).