Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp333628pxb; Wed, 14 Apr 2021 17:03:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4a/HgtgKaOiNogwBSpXQ1/KHgX16R1Xf1O8Q91FV7BQjS5nlwwh90DtFXn1dhEfYCWBU8 X-Received: by 2002:a17:906:a14c:: with SMTP id bu12mr574301ejb.549.1618445031830; Wed, 14 Apr 2021 17:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618445031; cv=none; d=google.com; s=arc-20160816; b=0cm+1/mx5iY2yv3Xlk9I8+WoYEcdSVlfUae1vI4tyHEC1DBTuKTvO47SdJzC8AC38h 9tgzLrPal8IRUBFLV+gWRaWf9cpe8vt3zy4UGu8WPRxUe8r1LrPSusKjmBKAm8EqSRgO ++4qPVaADIXCEmiaS/Y6K13LpJhP+vNansDKvCWBxAIEgyuONJcOU0Yd9hZrbPQOc1SG H3GpipDViVkifmWOzyg5zgfIu70CPv24vlzH87THyTcbxu8ydgPBdvRtZT8yjZu2hGs5 QRaD0INGO1LukQTV/6Y9qga1xUbGxpDACbJVcYEihE7CMfK/JyluBS7zLzliUqb7EsIt wyOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FgIM2dWQlt+cv4L943XfP34jj5PrH6rrYLkFCRTYTi0=; b=Kr8/2GJDLOqUsiu32zSaGKMSMzgTjipGXwx3oLjaR4PMU7YJzqjzpqbg02oQHtflC8 Dpgk19aakmMgNpyb1oIT0s1WaCQBnZ02pKzF3FK21pYbzwDRwqaK3Rq6DyczxXNK7fQ8 QsSzXaOkk6sHxSAnlm7ONWl9hJ60zWohlBvpp2EBYGEIIHnt39dD4BHwAOJQ8RqlQzoZ CIx30PWWbsYUhIJ2AlHmSFwdfdkvdu3K+FHN/4geZluPBpOL3qOs23COE2j3SggqJPr6 EnNIESD6FGqUTgKO0M6W7OZUep4dcaxfoDs8bKV72D/aQmHBiO7pLYfX0AyQYwSdefII nozA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="DB/1wQ31"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jl15si731742ejc.18.2021.04.14.17.03.21; Wed, 14 Apr 2021 17:03:51 -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; dkim=pass header.i=@broadcom.com header.s=google header.b="DB/1wQ31"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233829AbhDNLrb (ORCPT + 99 others); Wed, 14 Apr 2021 07:47:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233595AbhDNLra (ORCPT ); Wed, 14 Apr 2021 07:47:30 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5110C061574 for ; Wed, 14 Apr 2021 04:47:09 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id r13so6350762pjf.2 for ; Wed, 14 Apr 2021 04:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FgIM2dWQlt+cv4L943XfP34jj5PrH6rrYLkFCRTYTi0=; b=DB/1wQ31t1X7d1BmTWafb5soGIcAZW7EeQlYN7iUWatdl2tifjavlZgyOiqRkS59LQ 9z92O3u9GWzEgS4Wit0Ghnk8yqz4F97IHGylY6U9HTKOFwMSVs/0GQpsxmtEtz0xBzHJ h7SyfSzOqzmN/FMc0xiyQUO55Yezq127oJPyo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FgIM2dWQlt+cv4L943XfP34jj5PrH6rrYLkFCRTYTi0=; b=HErUXAUgEILkT/AL3wL76dhKpYVURwQtdCuOrqW1xG3CrjMOg8RusAq/6W/JlFmyHU m6btaZM+TFjPWcvljvCowUfsKPx+E7MQZzZiOmJo1L0Cajvy5slSdYPeX0sDTPpbCNJh 7hHaC5VsWS6bfohexHceHZNBJA5UjStVEJTayqrG0Csg+h6Bdrou0fTA2KkZBoh7Q2ZB HlnfKK464ySB7t0l/kIUN8Co44TQu+Fg2KcYtpKRPcUyRC00SFEowLxZZ8LfNgNs6p3j hBnUkL6JBZ8+Ahr52woVe0QsA8G3ZJQCSKHG/IbjkyDZf3tJxwKb7vJ3LYC7T+gN+YRg 0lOA== X-Gm-Message-State: AOAM533Wl5LovWf4gJAjfhxkTCJilczbUsrJ4wqnf1Y2s3RRStLG7VD8 K04QwOBP/B23KbPihRj5qF0zWQMrWG3le03K9kQaJA== X-Received: by 2002:a17:90b:3b8c:: with SMTP id pc12mr3252713pjb.208.1618400828960; Wed, 14 Apr 2021 04:47:08 -0700 (PDT) MIME-Version: 1.0 References: <20210329094532.4165147-1-liushixin2@huawei.com> In-Reply-To: <20210329094532.4165147-1-liushixin2@huawei.com> From: Sumit Saxena Date: Wed, 14 Apr 2021 17:16:43 +0530 Message-ID: Subject: Re: [PATCH -next] scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock To: Shixin Liu Cc: Kashyap Desai , Shivasharan S , "James E.J. Bottomley" , "Martin K. Petersen" , "PDL,MEGARAIDLINUX" , Linux SCSI List , LKML Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000008925df05bfed4e8b" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000008925df05bfed4e8b Content-Type: text/plain; charset="UTF-8" On Mon, Mar 29, 2021 at 2:45 PM Shixin Liu wrote: > > spinlock can be initialized automatically with DEFINE_SPINLOCK() > rather than explicitly calling spin_lock_init(). Acked-by: Sumit Saxena > > 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 > --0000000000008925df05bfed4e8b Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQbQYJKoZIhvcNAQcCoIIQXjCCEFoCAQExDzANB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