Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp45358pxf; Tue, 30 Mar 2021 18:47:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/cktbAS23cmb35M71D0YT5bKAA45evwiGArGNQy/6oDFUwHZeonsaBMzr8psnt6WyIJfq X-Received: by 2002:a17:906:8043:: with SMTP id x3mr983056ejw.149.1617155223624; Tue, 30 Mar 2021 18:47:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617155223; cv=none; d=google.com; s=arc-20160816; b=CLQOzwzw4vUzHee0Cs6wxpKEoBe82F0hLkHXseslg6bDehTKL0GNQrhxpkgj90zww7 WEOoxNCjgHoZcOT216IXVlgu7UeJE+kZYPS2BWRPdVfPecbFNbVhCUXubu08BBR8xAZT nXIeb6Y0c0ZU19bzPDonw9HVQDJJMWQnvoZJMp4iC5kFV7nsKh114ffnI+nkd/gcYopz 8pPgPZT6pnYsPe6F4Odq2LMal0M7XN/tVXz94rUI10IQFmgc3RKgaPnlM4MM9D+ok6Ep m4apljxE6o9RQDGyYf4hJM/i+vfZNh74Bk2oMtx/4PwenHEoFN/pqCr71o7BrN5/Wh/I cLbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=m4u8JR6MM4huUDhxigBkhCpOGYGPZYFO4Dw52DRBzbw=; b=MrBmuPyCL/RuFHemwqGTpv5ZbWL3HJJqS4tOnfy9glVuttANJIo353QF7npETaadOJ 7Wf9azaCBDuJRMXxtULe1Rj0H6GfctG7BRwZ23ly6x3S0/lSYkNQmwnG4UwBzoOaOzkP ayGyYlPmQ3bAtdWvlucYsCQt5gfYAva8H0mdxCgL36Gi6fu6/T6vMK/xceYyqmjsU1ru Y0/SKP2AoDmrUt8Cb+isS7ZjUjOUO0ek8FpdhzV8b2fVI6QvTvQ80QJVZP+ArmysfAaZ /wJceQfxzN1Q/8GgLJWZIuLdkWfPC7ek2QKtsSVp6dxKSCgb41nrSJwtisfZuNKlxCk0 Q8Lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k18si391875eja.602.2021.03.30.18.46.40; Tue, 30 Mar 2021 18:47:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233184AbhCaBoB (ORCPT + 99 others); Tue, 30 Mar 2021 21:44:01 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14647 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233072AbhCaBno (ORCPT ); Tue, 30 Mar 2021 21:43:44 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F98Cz16rnzmbkG; Wed, 31 Mar 2021 09:41:03 +0800 (CST) Received: from ubuntu180.huawei.com (10.175.100.227) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Wed, 31 Mar 2021 09:43:27 +0800 From: Tang Yizhou To: , Potnuri Bharat Teja , "Doug Ledford" , Jason Gunthorpe CC: , , , Hulk Robot Subject: [PATCH -next] RDMA/iw_cxgb4: Use DEFINE_SPINLOCK() for spinlock Date: Wed, 31 Mar 2021 10:01:05 +0800 Message-ID: <20210331020105.4858-1-tangyizhou@huawei.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.100.227] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Tang Yizhou --- 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);