mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
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 <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4909 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user