linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/6] lightnvm: pblk: improve error message if down_timeout fails
@ 2017-09-21 11:27 Rakesh Pandit
  2017-09-22  8:55 ` Javier González
  0 siblings, 1 reply; 3+ messages in thread
From: Rakesh Pandit @ 2017-09-21 11:27 UTC (permalink / raw)
  To: Matias Bjørling, linux-block, linux-kernel; +Cc: Javier González

The two pr_err messages are useless as they don't even differentiate
error code.

Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
---
 drivers/lightnvm/pblk-core.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index b92eabc..74ddb30 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -1734,16 +1734,8 @@ static void __pblk_down_page(struct pblk *pblk, struct ppa_addr *ppa_list,
 #endif
 
 	ret = down_timeout(&rlun->wr_sem, msecs_to_jiffies(30000));
-	if (ret) {
-		switch (ret) {
-		case -ETIME:
-			pr_err("pblk: lun semaphore timed out\n");
-			break;
-		case -EINTR:
-			pr_err("pblk: lun semaphore timed out\n");
-			break;
-		}
-	}
+	if (ret == -ETIME || ret == -EINTR)
+		pr_err("pblk: taking lun semaphore timed out: err %d\n", -ret);
 }
 
 void pblk_down_page(struct pblk *pblk, struct ppa_addr *ppa_list, int nr_ppas)
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-25 10:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21 11:27 [PATCH 4/6] lightnvm: pblk: improve error message if down_timeout fails Rakesh Pandit
2017-09-22  8:55 ` Javier González
2017-09-25 10:15   ` Matias Bjørling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).