* [PATCH -next] crypto: geode -: use DEFINE_SPINLOCK() for spinlock
@ 2021-04-06 12:00 Huang Guobin
2021-04-16 11:29 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Huang Guobin @ 2021-04-06 12:00 UTC (permalink / raw)
To: huangguobin4, David S. Miller, Herbert Xu
Cc: linux-geode, linux-crypto, linux-kernel
From: Guobin Huang <huangguobin4@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: Guobin Huang <huangguobin4@huawei.com>
---
drivers/crypto/geode-aes.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 4ee010f39912..fa5a9f207bc9 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -21,7 +21,7 @@
/* Static structures */
static void __iomem *_iobase;
-static spinlock_t lock;
+static DEFINE_SPINLOCK(lock);
/* Write a 128 bit field (either a writable key or IV) */
static inline void
@@ -383,8 +383,6 @@ static int geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id)
goto erequest;
}
- spin_lock_init(&lock);
-
/* Clear any pending activity */
iowrite32(AES_INTR_PENDING | AES_INTR_MASK, _iobase + AES_INTR_REG);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] crypto: geode -: use DEFINE_SPINLOCK() for spinlock
2021-04-06 12:00 [PATCH -next] crypto: geode -: use DEFINE_SPINLOCK() for spinlock Huang Guobin
@ 2021-04-16 11:29 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2021-04-16 11:29 UTC (permalink / raw)
To: Huang Guobin; +Cc: David S. Miller, linux-geode, linux-crypto, linux-kernel
On Tue, Apr 06, 2021 at 08:00:03PM +0800, Huang Guobin wrote:
> From: Guobin Huang <huangguobin4@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: Guobin Huang <huangguobin4@huawei.com>
> ---
> drivers/crypto/geode-aes.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-16 11:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 12:00 [PATCH -next] crypto: geode -: use DEFINE_SPINLOCK() for spinlock Huang Guobin
2021-04-16 11:29 ` Herbert Xu
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).