Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1093183pxf; Fri, 2 Apr 2021 00:35:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvAOsYLka3ZbnX1W5HvwVvzzwn9uzpSr3YrpAzTAa9RT+P1dQKbjTHi2reylA4vactZV7z X-Received: by 2002:aa7:cc03:: with SMTP id q3mr14416870edt.366.1617348948942; Fri, 02 Apr 2021 00:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617348948; cv=none; d=google.com; s=arc-20160816; b=xfa9x7cFWTCgnBkaoCZ5i/PdVwdyWMtd4k9I1fpEn3eZy2fVQqVOR9wnBeSicluMtE 15poV7padXsBW21WpzPsO8ueUi0kzTgSOOEQ1Q6MVlLRvHE8U0JfRs8RYCH0wnBUZXT5 m0iAcgjyeZTLXrxU7XfOTXj2JqeE7l2gDRFPr211gvN2lBTr46lkqZCbBkP5l/aqplp4 APabXFQOSTEnOi3+QtsF7xNlgT42BpVAGMHocUdd/ut60JvHXWUqBorLpFanQefxEMYI tn5XuUw5tZwAh1Gsj8d6aqrGbirIIyVcNBHFfFBka2LdqPoHvejKdexdZB6zot7S5HIH /nug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=VrbaNBS99gWS5aUJbTovjITa9J968OR1AXLupVevR3c=; b=V2ffd41mXqsANYe+hDLqdRgRF87dC6R3q3eJc/c3W5RL0y+IEeVQBi8dTBc4N28abJ tamzejXt2Mn5nisP3cBYJRcUY/KcbFA8K/hE2yQE8dvXsItyiUnfaJiKfw0DMCipZLo4 7UwhCaGUT2tx/88lJVhDx27wCCvn53jAUaXxtf2ycthZo7uoplX+YlTtatui540VE+gP IHqsmoJvCh7T5w5X8jzpkJTTRj7lThZKk3gppYeCvAGUlBbynifj35eA0X3/eAi8yYux yc2GM87Dne/SOcSkHKj5h1bmvXzmmIBmbTpIXkMzz7PU9HP/ufiL12jt7ZNrIE4P25oO kakQ== 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 cx24si5918196edb.541.2021.04.02.00.35.24; Fri, 02 Apr 2021 00:35:48 -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 S233521AbhDBHdU (ORCPT + 99 others); Fri, 2 Apr 2021 03:33:20 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15529 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229594AbhDBHdT (ORCPT ); Fri, 2 Apr 2021 03:33:19 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FBWtN37pHzNsDn; Fri, 2 Apr 2021 15:30:36 +0800 (CST) Received: from huawei.com (10.67.174.166) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Fri, 2 Apr 2021 15:33:10 +0800 From: Zucheng Zheng To: , CC: , , Subject: [PATCH -next] driver: aoe: use DEFINE_SPINLOCK() for spinlock Date: Fri, 2 Apr 2021 15:33:11 +0800 Message-ID: <20210402073311.74558-1-zhengzucheng@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.166] 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: Zucheng Zheng --- drivers/block/aoe/aoenet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c index 63773a90581d..46cce83c155d 100644 --- a/drivers/block/aoe/aoenet.c +++ b/drivers/block/aoe/aoenet.c @@ -47,7 +47,7 @@ static int __init aoe_iflist_setup(char *str) __setup("aoe_iflist=", aoe_iflist_setup); #endif -static spinlock_t txlock; +static DEFINE_SPINLOCK(txlock); static struct sk_buff_head skbtxq; /* enters with txlock held */ @@ -201,7 +201,6 @@ aoenet_init(void) { skb_queue_head_init(&skbtxq); init_waitqueue_head(&txwq); - spin_lock_init(&txlock); kts.lock = &txlock; kts.fn = tx; kts.waitq = &txwq; -- 2.17.1