From patchwork Tue Mar 30 12:59:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 12172483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A550C433E0 for ; Tue, 30 Mar 2021 12:57:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D92B619BD for ; Tue, 30 Mar 2021 12:57:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231922AbhC3M5L (ORCPT ); Tue, 30 Mar 2021 08:57:11 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:15399 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232030AbhC3M46 (ORCPT ); Tue, 30 Mar 2021 08:56:58 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4F8qD23wGwznTpm; Tue, 30 Mar 2021 20:54:58 +0800 (CST) Received: from huawei.com (10.175.103.91) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Tue, 30 Mar 2021 20:56:29 +0800 From: Yang Yingliang To: , CC: Subject: [PATCH -next] scsi: fnic: remove unnecessary spin_lock_init() and INIT_LIST_HEAD() Date: Tue, 30 Mar 2021 20:59:11 +0800 Message-ID: <20210330125911.1050879-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The spinlock and list head of fnic_list is initialized statically. It is unnecessary to initialize by spin_lock_init() and INIT_LIST_HEAD(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/scsi/fnic/fnic_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 186c3ab4456b..786f9d2704b6 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -1100,9 +1100,6 @@ static int __init fnic_init_module(void) goto err_create_fnic_workq; } - spin_lock_init(&fnic_list_lock); - INIT_LIST_HEAD(&fnic_list); - fnic_fip_queue = create_singlethread_workqueue("fnic_fip_q"); if (!fnic_fip_queue) { printk(KERN_ERR PFX "fnic FIP work queue create failed\n");