Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: geode - use DEFINE_SPINLOCK() for spinlock

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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Guobin Huang and committed by
Herbert Xu
25ee76a2 fa07c1a3

+1 -3
+1 -3
drivers/crypto/geode-aes.c
··· 21 21 /* Static structures */ 22 22 23 23 static void __iomem *_iobase; 24 - static spinlock_t lock; 24 + static DEFINE_SPINLOCK(lock); 25 25 26 26 /* Write a 128 bit field (either a writable key or IV) */ 27 27 static inline void ··· 382 382 ret = -ENOMEM; 383 383 goto erequest; 384 384 } 385 - 386 - spin_lock_init(&lock); 387 385 388 386 /* Clear any pending activity */ 389 387 iowrite32(AES_INTR_PENDING | AES_INTR_MASK, _iobase + AES_INTR_REG);