On 02/07/2017 02:15 PM, Christoph Hellwig wrote: > On Tue, Jan 31, 2017 at 10:25:53AM +0100, Hannes Reinecke wrote: >> Split off _dechain_st() as separate function. >> No functional change. >> >> Signed-off-by: Hannes Reinecke <hare@xxxxxxxx> >> --- >> drivers/scsi/mpt3sas/mpt3sas_base.c | 23 ++++++++++++++--------- >> 1 file changed, 14 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c >> index 09d0008..120b317 100644 >> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c >> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c >> @@ -2365,6 +2365,19 @@ static int mpt3sas_remove_dead_ioc_func(void *arg) >> return smid; >> } >> >> +static void >> +_dechain_st(struct MPT3SAS_ADAPTER *ioc, struct scsiio_tracker *st) >> +{ >> + struct chain_tracker *chain_req; >> + >> + while (!list_empty(&st->chain_list)) { >> + chain_req = list_first_entry(&st->chain_list, >> + struct chain_tracker, >> + tracker_list); >> + list_move(&chain_req->tracker_list, &ioc->free_chain_list); >> + } > > Why not just use list_splice_init? > Yep, can do. Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)