From: "Krzysztof Hałasa" <khalasa@piap.pl>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] soc: ixp4xx: qmgr: Use DEFINE_SPINLOCK() for spinlock
Date: Wed, 31 Mar 2021 13:26:09 +0200 [thread overview]
Message-ID: <m38s63muni.fsf@t19.piap.pl> (raw)
In-Reply-To: <20210331095341.2175046-1-yangyingliang@huawei.com> (Yang Yingliang's message of "Wed, 31 Mar 2021 17:53:41 +0800")
Yang Yingliang <yangyingliang@huawei.com> writes:
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().
That's right.
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
> ---
> drivers/soc/ixp4xx/ixp4xx-qmgr.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
> index 8c968382cea7..dde3b668eb40 100644
> --- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
> +++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
> @@ -16,7 +16,7 @@
> static struct qmgr_regs __iomem *qmgr_regs;
> static int qmgr_irq_1;
> static int qmgr_irq_2;
> -static spinlock_t qmgr_lock;
> +static DEFINE_SPINLOCK(qmgr_lock);
> static u32 used_sram_bitmap[4]; /* 128 16-dword pages */
> static void (*irq_handlers[QUEUES])(void *pdev);
> static void *irq_pdevs[QUEUES];
> @@ -434,7 +434,6 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
> }
>
> used_sram_bitmap[0] = 0xF; /* 4 first pages reserved for config */
> - spin_lock_init(&qmgr_lock);
>
> dev_info(dev, "IXP4xx Queue Manager initialized.\n");
> return 0;
--
Krzysztof Hałasa
Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa
prev parent reply other threads:[~2021-03-31 11:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 9:53 [PATCH -next] soc: ixp4xx: qmgr: Use DEFINE_SPINLOCK() for spinlock Yang Yingliang
2021-03-31 11:26 ` Krzysztof Hałasa [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=m38s63muni.fsf@t19.piap.pl \
--to=khalasa@piap.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=yangyingliang@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