mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: chenlifu <chenlifu@huawei.com>
To: Russell King <linux@armlinux.org.uk>
Cc: <heying24@huawei.com>, <yuehaibing@huawei.com>,
	<weiyongjun1@huawei.com>, <johnny.chenyi@huawei.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH -next] i2c: gpio: use DEFINE_SPINLOCK() for spinlock
Date: Thu, 1 Apr 2021 11:38:30 +0800	[thread overview]
Message-ID: <fec9295e-c5d6-13ee-23f5-13b593d2fd2e@huawei.com> (raw)
In-Reply-To: <20210327095228.105123-1-chenlifu@huawei.com>

Kindly pinging ...

Best Regards,
Chen Lifu

在 2021/3/27 17:52, Chen Lifu 写道:
> From: Lifu Chen <chenlifu@huawei.com>
> 
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Lifu Chen <chenlifu@huawei.com>
> ---
>   arch/arm/mach-sa1100/simpad.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
> index c7fb9a73e4c5..c183432880d3 100644
> --- a/arch/arm/mach-sa1100/simpad.c
> +++ b/arch/arm/mach-sa1100/simpad.c
> @@ -45,7 +45,7 @@
>    */
>   
>   static long cs3_shadow;
> -static spinlock_t cs3_lock;
> +static DEFINE_SPINLOCK(cs3_lock);
>   static struct gpio_chip cs3_gpio;
>   
>   long simpad_get_cs3_ro(void)
> @@ -379,8 +379,6 @@ static int __init simpad_init(void)
>   {
>   	int ret;
>   
> -	spin_lock_init(&cs3_lock);
> -
>   	cs3_gpio.label = "simpad_cs3";
>   	cs3_gpio.base = SIMPAD_CS3_GPIO_BASE;
>   	cs3_gpio.ngpio = 24;
> 
> .
> 

  reply	other threads:[~2021-04-01  3:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27  9:52 Chen Lifu
2021-04-01  3:38 ` chenlifu [this message]
2021-04-01  7:49   ` Dan Carpenter

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=fec9295e-c5d6-13ee-23f5-13b593d2fd2e@huawei.com \
    --to=chenlifu@huawei.com \
    --cc=heying24@huawei.com \
    --cc=johnny.chenyi@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=weiyongjun1@huawei.com \
    --cc=yuehaibing@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

all inboxes | Powered by JetHome®