Re: [PATCH] bnx2fc: Simplify code
> "Christophe" == Christophe JAILLETwrites: Christophe> Calling 'list_splice' followed by 'INIT_LIST_HEAD' is Christophe> equivalent to 'list_splice_init'. Applied to 4.9/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] bnx2fc: Simplify code
On Sat, 3 Sep 2016, 7:05am -, 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> --- > 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(_dev_lock); > - list_splice(_list, _be_deleted); > - INIT_LIST_HEAD(_list); > + list_splice_init(_list, _be_deleted); > adapter_count = 0; > mutex_unlock(_dev_lock); > > Looks ok to me. Acked-by: Chad Dupuis -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] bnx2fc: Simplify code
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--- 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(_dev_lock); - list_splice(_list, _be_deleted); - INIT_LIST_HEAD(_list); + list_splice_init(_list, _be_deleted); adapter_count = 0; mutex_unlock(_dev_lock); -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html