From 571df65257407bfc460aff77bfc379451147b174 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 14 Jul 2010 12:57:39 +0000 Subject: [PATCH] Fixing broken perf build git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1821 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst_debug.h | 4 ++++ scst/src/dev_handlers/scst_user.c | 3 +-- scst/src/scst_lib.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index af00a7328..f836ceb3c 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -145,6 +145,8 @@ int debug_print_prefix(unsigned long trace_flag, void debug_print_buffer(const void *data, int len); const char *debug_transport_id_to_initiator_name(const uint8_t *transport_id); +#define TRACING_MINOR() (trace_flag & TRACE_MINOR) + #define TRACE(trace, format, args...) \ do { \ if (___unlikely(trace_flag & (trace))) { \ @@ -183,6 +185,8 @@ do { \ #else /* CONFIG_SCST_DEBUG || CONFIG_SCST_TRACING */ +#define TRACING_MINOR() (false) + #define TRACE(trace, args...) do {} while (0) #define PRINT_BUFFER(message, buff, len) do {} while (0) #define PRINT_BUFF_FLAG(flag, message, buff, len) do {} while (0) diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index 06755cc8a..8633f35e1 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -618,8 +618,7 @@ static int dev_user_alloc_sg(struct scst_user_cmd *ucmd, int cached_buff) if (unlikely(cmd->sg_cnt > cmd->tgt_dev->max_sg_cnt)) { static int ll; - if ((ll < 10) || (trace_flag & TRACE_MINOR)) - if (ll < 10) { + if ((ll < 10) || TRACING_MINOR()) { PRINT_INFO("Unable to complete command due to " "SG IO count limitation (requested %d, " "available %d, tgt lim %d)", diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 8211ae96f..9bd5c43a3 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -4410,7 +4410,7 @@ int scst_alloc_space(struct scst_cmd *cmd) goto out; if (unlikely(cmd->sg_cnt > tgt_dev->max_sg_cnt)) { - if ((ll < 10) || (trace_flag & TRACE_MINOR)) { + if ((ll < 10) || TRACING_MINOR()) { PRINT_INFO("Unable to complete command due to " "SG IO count limitation (requested %d, " "available %d, tgt lim %d)", cmd->sg_cnt, @@ -4430,7 +4430,7 @@ int scst_alloc_space(struct scst_cmd *cmd) goto out_sg_free; if (unlikely(cmd->out_sg_cnt > tgt_dev->max_sg_cnt)) { - if ((ll < 10) || (trace_flag & TRACE_MINOR)) { + if ((ll < 10) || TRACING_MINOR()) { PRINT_INFO("Unable to complete command due to " "SG IO count limitation (OUT buffer, requested " "%d, available %d, tgt lim %d)", cmd->out_sg_cnt,