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

crypto: ccp - 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: Tang Yizhou <tangyizhou@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Tang Yizhou and committed by
Herbert Xu
63655b62 fd4317b7

+1 -2
+1 -2
drivers/crypto/ccp/ccp-crypto-main.c
··· 59 59 #define CCP_CRYPTO_MAX_QLEN 100 60 60 61 61 static struct ccp_crypto_queue req_queue; 62 - static spinlock_t req_queue_lock; 62 + static DEFINE_SPINLOCK(req_queue_lock); 63 63 64 64 struct ccp_crypto_cmd { 65 65 struct list_head entry; ··· 410 410 return ret; 411 411 } 412 412 413 - spin_lock_init(&req_queue_lock); 414 413 INIT_LIST_HEAD(&req_queue.cmds); 415 414 req_queue.backlog = &req_queue.cmds; 416 415 req_queue.cmd_count = 0;