From: Hugues Fruchet <hugues.fruchet@st.com>
To: Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
"Hans Verkuil" <hverkuil@xs4all.nl>
Cc: <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-media@vger.kernel.org>,
"Benjamin Gaignard" <benjamin.gaignard@linaro.org>,
Yannick Fertre <yannick.fertre@st.com>,
Hugues Fruchet <hugues.fruchet@st.com>
Subject: [PATCH v1 3/3] media: stm32-dcmi: improve error trace points
Date: Wed, 7 Feb 2018 18:35:36 +0100 [thread overview]
Message-ID: <1518024936-2455-4-git-send-email-hugues.fruchet@st.com> (raw)
In-Reply-To: <1518024936-2455-1-git-send-email-hugues.fruchet@st.com>
Fix some missing "\n".
Trace error returned by subdev streamon/streamoff.
Remove extra "0x" unneeded with %pad formatter.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
---
drivers/media/platform/stm32/stm32-dcmi.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
index dfab867..2fd8bed 100644
--- a/drivers/media/platform/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/stm32/stm32-dcmi.c
@@ -234,7 +234,7 @@ static void dcmi_dma_callback(void *param)
/* Restart a new DMA transfer with next buffer */
if (dcmi->state == RUNNING) {
if (list_empty(&dcmi->buffers)) {
- dev_err(dcmi->dev, "%s: No more buffer queued, cannot capture buffer",
+ dev_err(dcmi->dev, "%s: No more buffer queued, cannot capture buffer\n",
__func__);
dcmi->errors_count++;
dcmi->active = NULL;
@@ -249,7 +249,7 @@ static void dcmi_dma_callback(void *param)
list_del_init(&dcmi->active->list);
if (dcmi_start_capture(dcmi)) {
- dev_err(dcmi->dev, "%s: Cannot restart capture on DMA complete",
+ dev_err(dcmi->dev, "%s: Cannot restart capture on DMA complete\n",
__func__);
spin_unlock(&dcmi->irqlock);
@@ -478,7 +478,7 @@ static int dcmi_buf_prepare(struct vb2_buffer *vb)
vb2_set_plane_payload(&buf->vb.vb2_buf, 0, buf->size);
- dev_dbg(dcmi->dev, "buffer[%d] phy=0x%pad size=%zu\n",
+ dev_dbg(dcmi->dev, "buffer[%d] phy=%pad size=%zu\n",
vb->index, &buf->paddr, buf->size);
}
@@ -524,7 +524,7 @@ static int dcmi_start_streaming(struct vb2_queue *vq, unsigned int count)
ret = clk_enable(dcmi->mclk);
if (ret) {
- dev_err(dcmi->dev, "%s: Failed to start streaming, cannot enable clock",
+ dev_err(dcmi->dev, "%s: Failed to start streaming, cannot enable clock\n",
__func__);
goto err_release_buffers;
}
@@ -600,7 +600,7 @@ static int dcmi_start_streaming(struct vb2_queue *vq, unsigned int count)
ret = dcmi_start_capture(dcmi);
if (ret) {
- dev_err(dcmi->dev, "%s: Start streaming failed, cannot start capture",
+ dev_err(dcmi->dev, "%s: Start streaming failed, cannot start capture\n",
__func__);
spin_unlock_irq(&dcmi->irqlock);
@@ -651,7 +651,8 @@ static void dcmi_stop_streaming(struct vb2_queue *vq)
/* Disable stream on the sub device */
ret = v4l2_subdev_call(dcmi->entity.subdev, video, s_stream, 0);
if (ret && ret != -ENOIOCTLCMD)
- dev_err(dcmi->dev, "stream off failed in subdev\n");
+ dev_err(dcmi->dev, "%s: Failed to stop streaming, subdev streamoff error (%d)\n",
+ __func__, ret);
dcmi->state = STOPPING;
@@ -667,7 +668,8 @@ static void dcmi_stop_streaming(struct vb2_queue *vq)
reg_clear(dcmi->regs, DCMI_CR, CR_ENABLE);
if (!timeout) {
- dev_err(dcmi->dev, "Timeout during stop streaming\n");
+ dev_err(dcmi->dev, "%s: Timeout during stop streaming\n",
+ __func__);
dcmi->state = STOPPED;
}
--
1.9.1
prev parent reply other threads:[~2018-02-07 17:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 17:35 [PATCH v1 0/3] STM32 DCMI redundant code & trace cleanup Hugues Fruchet
2018-02-07 17:35 ` [PATCH v1 1/3] media: stm32-dcmi: remove redundant capture enable Hugues Fruchet
2018-02-07 17:35 ` [PATCH v1 2/3] media: stm32-dcmi: remove redundant clear of interrupt flags Hugues Fruchet
2018-02-07 17:35 ` Hugues Fruchet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1518024936-2455-4-git-send-email-hugues.fruchet@st.com \
--to=hugues.fruchet@st.com \
--cc=alexandre.torgue@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=yannick.fertre@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®