lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL2rwxoJTfLrD_a1sf+gkT1xdBrwOZj3seYq7W6=ETdb3MBJVw@mail.gmail.com>
Date:   Wed, 14 Apr 2021 17:16:43 +0530
From:   Sumit Saxena <sumit.saxena@...adcom.com>
To:     Shixin Liu <liushixin2@...wei.com>
Cc:     Kashyap Desai <kashyap.desai@...adcom.com>,
        Shivasharan S <shivasharan.srikanteshwara@...adcom.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        "PDL,MEGARAIDLINUX" <megaraidlinux.pdl@...adcom.com>,
        Linux SCSI List <linux-scsi@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock

On Mon, Mar 29, 2021 at 2:45 PM Shixin Liu <liushixin2@...wei.com> wrote:
>
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().
Acked-by: Sumit Saxena <sumit.saxena@...adcom.com>
>
> Signed-off-by: Shixin Liu <liushixin2@...wei.com>
> ---
>  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
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ