linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/3, RESEND] media: camss: vfe: Use trace_printk for debugging only
@ 2020-08-20  9:14 Nicolas Boichat
  2020-08-20  9:14 ` [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed Nicolas Boichat
  2020-08-20 14:21 ` [PATCH v4 1/3, RESEND] media: camss: vfe: Use trace_printk for debugging only Steven Rostedt
  0 siblings, 2 replies; 23+ messages in thread
From: Nicolas Boichat @ 2020-08-20  9:14 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Steven Rostedt, Greg Kroah-Hartman
  Cc: Nicolas Boichat, Andy Gross, Bjorn Andersson, Todor Tomov,
	linux-arm-msm, linux-kernel, linux-media

trace_printk should not be used in production code. Since
tracing interrupts is presumably latency sensitive, pr_dbg is
not appropriate, so guard the call with a preprocessor symbol
that can be defined for debugging purpose.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
---

(resending this patch as part of the whole series, since we need a new
patch 3/3 now).

 drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 2 ++
 drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
index 174a36be6f5d866..0c57171fae4f9e9 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
@@ -936,8 +936,10 @@ static irqreturn_t vfe_isr(int irq, void *dev)
 
 	vfe->ops->isr_read(vfe, &value0, &value1);
 
+#ifdef CAMSS_VFE_TRACE_IRQ
 	trace_printk("VFE: status0 = 0x%08x, status1 = 0x%08x\n",
 		     value0, value1);
+#endif
 
 	if (value0 & VFE_0_IRQ_STATUS_0_RESET_ACK)
 		vfe->isr_ops.reset_ack(vfe);
diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c
index 0dca8bf9281e774..307675925e5c779 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c
@@ -1058,8 +1058,10 @@ static irqreturn_t vfe_isr(int irq, void *dev)
 
 	vfe->ops->isr_read(vfe, &value0, &value1);
 
+#ifdef CAMSS_VFE_TRACE_IRQ
 	trace_printk("VFE: status0 = 0x%08x, status1 = 0x%08x\n",
 		     value0, value1);
+#endif
 
 	if (value0 & VFE_0_IRQ_STATUS_0_RESET_ACK)
 		vfe->isr_ops.reset_ack(vfe);
-- 
2.28.0.220.ged08abb693-goog


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-08-21 12:37 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20  9:14 [PATCH v4 1/3, RESEND] media: camss: vfe: Use trace_printk for debugging only Nicolas Boichat
2020-08-20  9:14 ` [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed Nicolas Boichat
2020-08-20 14:23   ` Steven Rostedt
2020-08-21  0:13     ` Nicolas Boichat
2020-08-21  0:36       ` Steven Rostedt
2020-08-21  1:39         ` Nicolas Boichat
2020-08-21  1:57           ` Steven Rostedt
2020-08-21  2:36             ` Joe Perches
2020-08-21  2:42               ` Nicolas Boichat
2020-08-21  2:49                 ` Joe Perches
2020-08-21  3:04                   ` Steven Rostedt
2020-08-21  3:08                     ` Steven Rostedt
2020-08-21  2:44               ` Steven Rostedt
2020-08-21  2:39             ` Nicolas Boichat
2020-08-21  3:01               ` Steven Rostedt
2020-08-21 12:19                 ` Nicolas Boichat
2020-08-21  8:48         ` David Laight
2020-08-21 10:27           ` Nicolas Boichat
2020-08-21 11:32             ` David Laight
2020-08-21 12:07               ` Nicolas Boichat
2020-08-21 12:18                 ` David Laight
2020-08-21 12:37                   ` Nicolas Boichat
2020-08-20 14:21 ` [PATCH v4 1/3, RESEND] media: camss: vfe: Use trace_printk for debugging only Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).