From cf43cffd8167d8270cee8a4043d6d4e7504fe0df Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 2 Jul 2013 06:13:23 +0000 Subject: [PATCH] scst_priv.h: Avoid that smatch complains about unreachable code Move three lines of code such that these lines are only visible to the compiler when these lines are relevant. Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4909 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_priv.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scst/src/scst_priv.h b/scst/src/scst_priv.h index 3253aa8e5..41474886c 100644 --- a/scst/src/scst_priv.h +++ b/scst/src/scst_priv.h @@ -195,18 +195,16 @@ struct scst_cmd_thread_t { static inline bool scst_set_io_context(struct scst_cmd *cmd, struct io_context **old) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) + return false; +#else +#ifdef CONFIG_SCST_TEST_IO_IN_SIRQ + return false; +#else bool res; EXTRACHECKS_BUG_ON(old == NULL); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) - return false; -#endif - -#ifdef CONFIG_SCST_TEST_IO_IN_SIRQ - return false; -#endif - if (cmd->cmd_threads == &scst_main_cmd_threads) { EXTRACHECKS_BUG_ON(in_interrupt()); /* @@ -223,6 +221,8 @@ static inline bool scst_set_io_context(struct scst_cmd *cmd, res = false; return res; +#endif +#endif } static inline void scst_reset_io_context(struct scst_tgt_dev *tgt_dev,