From 5d081b0af44ce5581d1734e316e3336991310bac Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 13 Jan 2019 21:26:38 +0000 Subject: [PATCH] scst: Make scst_alloc_add_tgt_dev() somewhat easier to read (merge r7848 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7887 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 969d3c1c4..3e55e290b 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5277,10 +5277,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;