kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] RDMA/iw_cxgb4: Use DEFINE_SPINLOCK() for spinlock
@ 2021-03-31  2:01 Tang Yizhou
  2021-03-31 18:43 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Tang Yizhou @ 2021-03-31  2:01 UTC (permalink / raw)
  To: tangyizhou, Potnuri Bharat Teja, Doug Ledford, Jason Gunthorpe
  Cc: linux-rdma, linux-kernel, kernel-janitors, Hulk Robot

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>
---
 drivers/infiniband/hw/cxgb4/cm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 81903749d241..c97e84d5db74 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -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 LIST_HEAD(timeout_list);
-static spinlock_t timeout_lock;
+static DEFINE_SPINLOCK(timeout_lock);
 
 static void deref_cm_id(struct c4iw_ep_common *epc)
 {
@@ -4451,7 +4451,6 @@ c4iw_handler_func c4iw_handlers[NUM_CPL_CMDS] = {
 
 int __init c4iw_cm_init(void)
 {
-	spin_lock_init(&timeout_lock);
 	skb_queue_head_init(&rxq);
 
 	workq = alloc_ordered_workqueue("iw_cxgb4", WQ_MEM_RECLAIM);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] RDMA/iw_cxgb4: Use DEFINE_SPINLOCK() for spinlock
  2021-03-31  2:01 [PATCH -next] RDMA/iw_cxgb4: Use DEFINE_SPINLOCK() for spinlock Tang Yizhou
@ 2021-03-31 18:43 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2021-03-31 18:43 UTC (permalink / raw)
  To: Tang Yizhou
  Cc: Potnuri Bharat Teja, Doug Ledford, linux-rdma, linux-kernel,
	kernel-janitors, Hulk Robot

On Wed, Mar 31, 2021 at 10:01:05AM +0800, Tang Yizhou wrote:
> 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>
> ---
>  drivers/infiniband/hw/cxgb4/cm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-31 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-31  2:01 [PATCH -next] RDMA/iw_cxgb4: Use DEFINE_SPINLOCK() for spinlock Tang Yizhou
2021-03-31 18:43 ` Jason Gunthorpe

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).