Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3444423pxf; Mon, 29 Mar 2021 02:19:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDmAWjh3QAl4MGSQN9OYGg+TsVxhvLKKhD5+UsL45s3pc7LjAXRauLIuDIfhLWUQKm4s/L X-Received: by 2002:a17:906:4a05:: with SMTP id w5mr27113234eju.526.1617009579727; Mon, 29 Mar 2021 02:19:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617009579; cv=none; d=google.com; s=arc-20160816; b=ErUa+ZmaV9NKufrqATYPi9OPJj31J2ZwjwL+moBARDSvSNhdB0jUyjAXp6Y+ohIC1Y ipg9xzjqkd0H/6jcDZlQ7mARqoEA96CrSCVaDhwg8kP11/2MYJJVsa8d6cXe1gu3lv2r v2y1OH0P2X+j2ic3vCL+hIuOLKrohY5HHJluS2fepqAM8cxA4wrBQSFxa04q4SaUMylt LseNF2LuU3HrMokPvF8XACCyHdAw3rR46bOnKkgQFEElkovg0tm4vzE4GecxndAwPOSS e5LOsUgqiNR8hiJlfM2gh2eb5mje6B3qSJ2oxVIjEANJwObJjMaU3eRkYJzQeNYw/Hlq pFhw== 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=/tP9HsTCmsnPbgpSDoxVSDwc9ms+r6PMZB0/jWsEulY=; b=STmxS5JIv1oMbjSVetLD3W/itcNdQuILbcZG+ihNH2h7Uu5DUGtRVo5JyYzUX8mgTW /uS26b/M1qc/v9BGl874rGIrLUylHc6Cs1OxLPNnwg1K+8s3gKFzPq1wTKD66Nde8QwG q3hyA9FSZW9Z7TRGPcFg2VjatdSXZtEPC/bkSg7yOYe9kHw8ReLWxqpY7ARNnvH1CT3h 50MCWS+BbYRTZdsVgR2t10a0F3ebO93HNlc1abVJVDgA7QNkTQ447iG4QBVGjCL9yBdc f7tJtYnUT/BxC2sUq/LwOCpOJc3ed4rWETa2RMB/kKkWGXMT4BiuN6Dk7wmTkW4nn7dD 2Lyw== 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 l15si11970579edb.89.2021.03.29.02.19.17; Mon, 29 Mar 2021 02:19:39 -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 S235319AbhC2JP6 (ORCPT + 99 others); Mon, 29 Mar 2021 05:15:58 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14181 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233825AbhC2JP0 (ORCPT ); Mon, 29 Mar 2021 05:15:26 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F86L74jBqzmbKD; Mon, 29 Mar 2021 17:12:47 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Mon, 29 Mar 2021 17:15:16 +0800 From: Shixin Liu To: Kashyap Desai , Sumit Saxena , Shivasharan S , "James E.J. Bottomley" , "Martin K. Petersen" CC: , , , Shixin Liu Subject: [PATCH -next] scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock Date: Mon, 29 Mar 2021 17:45:32 +0800 Message-ID: <20210329094532.4165147-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] 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(). Signed-off-by: Shixin Liu --- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 4d4e9dbe5193..8ed347eebf07 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -213,7 +213,7 @@ static bool support_nvme_encapsulation; static bool support_pci_lane_margining; /* define lock for aen poll */ -static spinlock_t poll_aen_lock; +static DEFINE_SPINLOCK(poll_aen_lock); extern struct dentry *megasas_debugfs_root; extern int megasas_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num); @@ -8934,8 +8934,6 @@ static int __init megasas_init(void) */ pr_info("megasas: %s\n", MEGASAS_VERSION); - spin_lock_init(&poll_aen_lock); - support_poll_for_event = 2; support_device_change = 1; support_nvme_encapsulation = true; -- 2.25.1