Commit 2e919a32 authored by Tang Yizhou's avatar Tang Yizhou Committed by Jason Gunthorpe

RDMA/iw_cxgb4: Use DEFINE_SPINLOCK() for spinlock

spinlock can be initialized automatically with DEFINE_SPINLOCK() rather
than explicitly calling spin_lock_init().

Link: https://lore.kernel.org/r/20210331020105.4858-1-tangyizhou@huawei.comReported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarTang Yizhou <tangyizhou@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 7f13e0be
...@@ -145,7 +145,7 @@ static void connect_reply_upcall(struct c4iw_ep *ep, int status); ...@@ -145,7 +145,7 @@ static void connect_reply_upcall(struct c4iw_ep *ep, int status);
static int sched(struct c4iw_dev *dev, struct sk_buff *skb); static int sched(struct c4iw_dev *dev, struct sk_buff *skb);
static LIST_HEAD(timeout_list); static LIST_HEAD(timeout_list);
static spinlock_t timeout_lock; static DEFINE_SPINLOCK(timeout_lock);
static void deref_cm_id(struct c4iw_ep_common *epc) static void deref_cm_id(struct c4iw_ep_common *epc)
{ {
...@@ -4451,7 +4451,6 @@ c4iw_handler_func c4iw_handlers[NUM_CPL_CMDS] = { ...@@ -4451,7 +4451,6 @@ c4iw_handler_func c4iw_handlers[NUM_CPL_CMDS] = {
int __init c4iw_cm_init(void) int __init c4iw_cm_init(void)
{ {
spin_lock_init(&timeout_lock);
skb_queue_head_init(&rxq); skb_queue_head_init(&rxq);
workq = alloc_ordered_workqueue("iw_cxgb4", WQ_MEM_RECLAIM); workq = alloc_ordered_workqueue("iw_cxgb4", WQ_MEM_RECLAIM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment