From 54ccb1add2f9798c36c9bf138f9b3358273ca768 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 17 May 2020 19:54:19 +0000 Subject: [PATCH] scst: Fix a debug statement in __scst_adjust_sg() Instead of printing the same 'sg' pointer in each iteration, print the sgi pointer. Fixes: commit 2755c024215f ("scst: Introduce for_each_sg() in scst_adjust_sg()") # v3.0.0 (r4910). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8929 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 7c4e858bd..687b8864c 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -3305,13 +3305,8 @@ static bool __scst_adjust_sg(struct scst_cmd *cmd, struct scatterlist *sg, l = 0; for_each_sg(sg, sgi, *sg_cnt, i) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) - TRACE_DBG("i %d, sg_cnt %d, sg %p, page_link %lx, len %d", i, - *sg_cnt, sg, sgi->page_link, sgi->length); -#else - TRACE_DBG("i %d, sg_cnt %d, sg %p, page_link %lx", i, - *sg_cnt, sg, 0UL); -#endif + TRACE_DBG("sg[%d/%d]: addr %p, offset %d, len %d", i, *sg_cnt, + sgi, sgi->offset, sgi->length); l += sgi->length; if (l >= adjust_len) { int left = adjust_len - (l - sgi->length);