+/**
+ * Logs an array of found residual entries to the console.
+ *
+ * [in] dir
+ * Receive or transmit direction
+ *
+ * [in] module
+ * Type of Device Module
+ *
+ * [in] count
+ * Number of entries in the residual array
+ *
+ * [in] residuals
+ * Pointer to an array of residual entries. Array is index same as
+ * the DB in which this function is used. Each entry holds residual
+ * value for that entry.
+ */
+#if (TF_RM_DEBUG == 1)
+static void
+tf_rm_log_residuals(enum tf_dir dir,
+ enum tf_module_type module,
+ uint16_t count,
+ uint16_t *residuals)
+{
+ int i;
+
+ /* Walk the residual array and log the types that wasn't
+ * cleaned up to the console.
+ */
+ for (i = 0; i < count; i++) {
+ if (residuals[i] != 0)
+ TFP_DRV_LOG(INFO,
+ "%s, %s was not cleaned up, %d outstanding\n",
+ tf_dir_2_str(dir),
+ tf_module_subtype_2_str(module, i),
+ residuals[i]);
+ }
+}
+#endif /* TF_RM_DEBUG == 1 */