Commit 6fb5d718 authored by Tsuchiya Yuto's avatar Tsuchiya Yuto Committed by Mauro Carvalho Chehab

media: atomisp: use IA_CSS_ERROR() for error messages in sh_css_mipi.c

Some debug messages for error cases (messages contain "error: ") use
IA_CSS_DEBUG_TRACE_PRIVATE debug level. This causes these error messages
not to appear unless users raise debug output level to 7 or higher (using
module parameter, dbg_level=7).

So, use IA_CSS_DEBUG_ERROR debug level (dbg_level=1) instead considering
that these are error messages. There is already a macro IA_CSS_ERROR()
for this use case. Let's use it. It automatically appends "error: " at
the beginning and a newline to a message. Therefore, we can remove them
from these messages.

While here, remove the unnecessary newline from one IA_CSS_ERROR()
occurrence in the same file.
Signed-off-by: default avatarTsuchiya Yuto <kitakar@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent d21ce8c2
...@@ -434,9 +434,8 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, ...@@ -434,9 +434,8 @@ allocate_mipi_frames(struct ia_css_pipe *pipe,
if ((!IS_ISP2401 && port >= N_CSI_PORTS) || if ((!IS_ISP2401 && port >= N_CSI_PORTS) ||
(IS_ISP2401 && err)) { (IS_ISP2401 && err)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, IA_CSS_ERROR("allocate_mipi_frames(%p) exit: port is not correct (port=%d).",
"allocate_mipi_frames(%p) exit: error: port is not correct (port=%d).\n", pipe, port);
pipe, port);
return -EINVAL; return -EINVAL;
} }
...@@ -497,9 +496,8 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, ...@@ -497,9 +496,8 @@ allocate_mipi_frames(struct ia_css_pipe *pipe,
my_css.mipi_frames[port][j] = NULL; my_css.mipi_frames[port][j] = NULL;
} }
} }
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, IA_CSS_ERROR("allocate_mipi_frames(%p, %d) exit: allocation failed.",
"allocate_mipi_frames(%p, %d) exit: error: allocation failed.\n", pipe, port);
pipe, port);
return err; return err;
} }
} }
...@@ -542,16 +540,14 @@ free_mipi_frames(struct ia_css_pipe *pipe) ...@@ -542,16 +540,14 @@ free_mipi_frames(struct ia_css_pipe *pipe)
if (pipe) { if (pipe) {
assert(pipe->stream); assert(pipe->stream);
if ((!pipe) || (!pipe->stream)) { if ((!pipe) || (!pipe->stream)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, IA_CSS_ERROR("free_mipi_frames(%p) exit: pipe or stream is null.",
"free_mipi_frames(%p) exit: error: pipe or stream is null.\n", pipe);
pipe);
return -EINVAL; return -EINVAL;
} }
if (!buffers_needed(pipe)) { if (!buffers_needed(pipe)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, IA_CSS_ERROR("free_mipi_frames(%p) exit: wrong mode.",
"free_mipi_frames(%p) exit: error: wrong mode.\n", pipe);
pipe);
return err; return err;
} }
...@@ -566,9 +562,8 @@ free_mipi_frames(struct ia_css_pipe *pipe) ...@@ -566,9 +562,8 @@ free_mipi_frames(struct ia_css_pipe *pipe)
if ((!IS_ISP2401 && port >= N_CSI_PORTS) || if ((!IS_ISP2401 && port >= N_CSI_PORTS) ||
(IS_ISP2401 && err)) { (IS_ISP2401 && err)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, IA_CSS_ERROR("free_mipi_frames(%p, %d) exit: pipe port is not correct.",
"free_mipi_frames(%p, %d) exit: error: pipe port is not correct.\n", pipe, port);
pipe, port);
return err; return err;
} }
...@@ -576,9 +571,8 @@ free_mipi_frames(struct ia_css_pipe *pipe) ...@@ -576,9 +571,8 @@ free_mipi_frames(struct ia_css_pipe *pipe)
#if !defined(ISP2401) #if !defined(ISP2401)
assert(ref_count_mipi_allocation[port] == 1); assert(ref_count_mipi_allocation[port] == 1);
if (ref_count_mipi_allocation[port] != 1) { if (ref_count_mipi_allocation[port] != 1) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, IA_CSS_ERROR("free_mipi_frames(%p) exit: wrong ref_count (ref_count=%d).",
"free_mipi_frames(%p) exit: error: wrong ref_count (ref_count=%d).\n", pipe, ref_count_mipi_allocation[port]);
pipe, ref_count_mipi_allocation[port]);
return err; return err;
} }
#endif #endif
...@@ -680,7 +674,7 @@ send_mipi_frames(struct ia_css_pipe *pipe) ...@@ -680,7 +674,7 @@ send_mipi_frames(struct ia_css_pipe *pipe)
if ((!IS_ISP2401 && port >= N_CSI_PORTS) || if ((!IS_ISP2401 && port >= N_CSI_PORTS) ||
(IS_ISP2401 && err)) { (IS_ISP2401 && err)) {
IA_CSS_ERROR("send_mipi_frames(%p) exit: invalid port specified (port=%d).\n", IA_CSS_ERROR("send_mipi_frames(%p) exit: invalid port specified (port=%d).",
pipe, port); pipe, port);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment