From 2e211122ee3042cf8245c7cd87054cdbc28f07ad Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 31 Dec 2018 18:55:02 +0000 Subject: [PATCH] scst: Make scst_alloc_add_tgt_dev() somewhat easier to read git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7848 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 7fd4a327d..1298bf9fd 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5283,10 +5283,11 @@ static int scst_alloc_add_tgt_dev(struct scst_session *sess, scst_sgv_pool_use_norm(tgt_dev); if (dev->scsi_dev != NULL) { - ini_sg = dev->scsi_dev->host->sg_tablesize; - ini_unchecked_isa_dma = dev->scsi_dev->host->unchecked_isa_dma; - ini_use_clustering = (dev->scsi_dev->host->use_clustering == - ENABLE_CLUSTERING); + struct Scsi_Host *shost = dev->scsi_dev->host; + + ini_sg = shost->sg_tablesize; + ini_unchecked_isa_dma = shost->unchecked_isa_dma; + ini_use_clustering = shost->use_clustering == ENABLE_CLUSTERING; } else { ini_sg = (1 << 15) /* infinite */; ini_unchecked_isa_dma = 0;