msm: bam_dmux: Use IPC Logging for string formatting
BAM DMUX currently formats a string into a local buffer before passing the
pre-formated string directly to IPC Logging. This results in an extra copy
operation and adds an extra timestamp. It also limits the printed string to
the size of the local buffer (which is currently 80 characters). Remove the
pre-formatting code and use the formatting capability in IPC Logging which
removes the local length limitations, improves performance and removes the
duplicate timestamp.
Change-Id: I11712d5232daee58ac2f0d5ec78a8ba11af1ca04
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
diff --git a/arch/arm/mach-msm/bam_dmux.c b/arch/arm/mach-msm/bam_dmux.c
index 405a16c..c8410dc 100644
--- a/arch/arm/mach-msm/bam_dmux.c
+++ b/arch/arm/mach-msm/bam_dmux.c
@@ -306,13 +306,6 @@
static int bam_dmux_uplink_vote;
static int bam_dmux_power_state;
-
-#define DMUX_LOG_KERR(fmt...) \
-do { \
- BAM_DMUX_LOG(fmt); \
- pr_err(fmt); \
-} while (0)
-
static void *bam_ipc_log_txt;
#define BAM_IPC_LOG_PAGES 5
@@ -354,6 +347,12 @@
} \
} while (0)
+#define DMUX_LOG_KERR(fmt, args...) \
+do { \
+ BAM_DMUX_LOG(fmt, args); \
+ pr_err(fmt, args); \
+} while (0)
+
static inline void set_tx_timestamp(struct tx_pkt_info *pkt)
{
unsigned long long t_now;
@@ -1899,7 +1898,7 @@
if (code == SUBSYS_BEFORE_SHUTDOWN) {
in_global_reset = 1;
in_ssr = 1;
- bam_dmux_log("%s: begin\n", __func__);
+ BAM_DMUX_LOG("%s: begin\n", __func__);
flush_workqueue(bam_mux_rx_workqueue);
}
if (code != SUBSYS_AFTER_SHUTDOWN)