]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/target/tcm_fc/tfc_cmd.c
tcm_fc: Avoid debug overhead when not debugging
[karo-tx-linux.git] / drivers / target / tcm_fc / tfc_cmd.c
index b9cb5006177e22166732032468bf8d0a733299f8..823e6922249d07e3122973ebdb370cd4994704a0 100644 (file)
@@ -48,7 +48,7 @@
 /*
  * Dump cmd state for debugging.
  */
-void ft_dump_cmd(struct ft_cmd *cmd, const char *caller)
+static void _ft_dump_cmd(struct ft_cmd *cmd, const char *caller)
 {
        struct fc_exch *ep;
        struct fc_seq *sp;
@@ -80,6 +80,12 @@ void ft_dump_cmd(struct ft_cmd *cmd, const char *caller)
        }
 }
 
+void ft_dump_cmd(struct ft_cmd *cmd, const char *caller)
+{
+       if (unlikely(ft_debug_logging))
+               _ft_dump_cmd(cmd, caller);
+}
+
 static void ft_free_cmd(struct ft_cmd *cmd)
 {
        struct fc_frame *fp;