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: <alpine.OSX.2.00.1609081049290.1086@administrators-macbook-pro.local>
Date:   Thu, 8 Sep 2016 10:50:03 -0400
From:   Chad Dupuis <chad.dupuis@...gic.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
CC:     <QLogic-Storage-Upstream@...gic.com>, <jejb@...ux.vnet.ibm.com>,
        <martin.petersen@...cle.com>, <linux-scsi@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
        <Dept_Linux_FC@...gic.com>
Subject: Re: [PATCH] bnx2fc: Simplify code


On Sat, 3 Sep 2016, 7:05am -0000, Christophe JAILLET wrote:

> Calling 'list_splice' followed by 'INIT_LIST_HEAD' is equivalent to
> 'list_splice_init'.
> 
> This has been spotted with the following coccinelle script:
> /////
> @@
> expression y,z;
> @@
> 
> -   list_splice(y,z);
> -   INIT_LIST_HEAD(y);
> +   list_splice_init(y,z);
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> index a5052dd8d7e6..88be12a02764 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> @@ -2765,8 +2765,7 @@ static void __exit bnx2fc_mod_exit(void)
>  	 * held.
>  	 */
>  	mutex_lock(&bnx2fc_dev_lock);
> -	list_splice(&adapter_list, &to_be_deleted);
> -	INIT_LIST_HEAD(&adapter_list);
> +	list_splice_init(&adapter_list, &to_be_deleted);
>  	adapter_count = 0;
>  	mutex_unlock(&bnx2fc_dev_lock);
>  
> 

Looks ok to me.

Acked-by: Chad Dupuis <chad.dupuis@...gic.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ