[PATCH v3] media: atomisp: remove redundant prefix from dev_dbg calls

Jeongin Yeo posted 1 patch 1 week, 5 days ago
.../atomisp/pci/runtime/binary/src/binary.c   | 133 ++++++++----------
1 file changed, 58 insertions(+), 75 deletions(-)
[PATCH v3] media: atomisp: remove redundant prefix from dev_dbg calls
Posted by Jeongin Yeo 1 week, 5 days ago
Remove the hardcoded function name and line number prefix from
dev_dbg() output strings within ia_css_binary_find(). dev_dbg()
can already emit the function name and line number via dynamic_debug's
'f' and 'l' flags, so embedding it in the format string is redundant.

This resolves the EMBEDDED_FUNCTION_NAME checkpatch warnings without
introducing __func__ to format strings.

No functional changes.

Signed-off-by: Jeongin Yeo <jeongin.yeo@luaberry.com>
---
Changes in v3:
- Remove the __LINE__ argument and "[%d]" prefix from dev_dbg() calls.
  Like __func__, line numbers are provided by dynamic_debug via the 'l' flag.
- Link to v2: https://lore.kernel.org/r/20260526200222.330280-1-jeongin.yeo@luaberry.com

Changes in v2:
- Remove the function name strings entirely instead of converting
  them to __func__, per feedback from Greg KH. dev_dbg() can already
  emit function names via dynamic_debug's 'f' flag.
- Link to v1: https://lore.kernel.org/r/20260526104750.1284935-1-jeongin.yeo@luaberry.com

 .../atomisp/pci/runtime/binary/src/binary.c   | 133 ++++++++----------
 1 file changed, 58 insertions(+), 75 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c b/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
index e9016d7775dc3..ef766a02b460b 100644
--- a/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
+++ b/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
@@ -925,7 +925,7 @@ int ia_css_binary_find(struct ia_css_binary_descr *descr, struct ia_css_binary *
 	/* MW: used after an error check, may accept NULL, but doubtful */
 	assert(binary);
 
-	dev_dbg(atomisp_dev, "ia_css_binary_find() enter: descr=%p, (mode=%d), binary=%p\n",
+	dev_dbg(atomisp_dev, "enter: descr=%p, (mode=%d), binary=%p\n",
 		descr, descr->mode, binary);
 
 	mode = descr->mode;
@@ -991,8 +991,7 @@ int ia_css_binary_find(struct ia_css_binary_descr *descr, struct ia_css_binary *
 		struct ia_css_binary_info *candidate = &xcandidate->sp;
 		/* printf("sh_css_binary_find: evaluating candidate:
 		 * %d\n",candidate->id); */
-		dev_dbg(atomisp_dev,
-			"ia_css_binary_find() candidate = %p, mode = %d ID = %d\n",
+		dev_dbg(atomisp_dev, "candidate = %p, mode = %d ID = %d\n",
 			candidate, candidate->pipeline.mode, candidate->id);
 
 		/*
@@ -1002,16 +1001,13 @@ int ia_css_binary_find(struct ia_css_binary_descr *descr, struct ia_css_binary *
 		*/
 		if (!candidate->enable.continuous &&
 		    continuous && (mode != IA_CSS_BINARY_MODE_COPY)) {
-			dev_dbg(atomisp_dev,
-				"ia_css_binary_find() [%d] continue: !%d && %d && (%d != %d)\n",
-				__LINE__, candidate->enable.continuous,
-				continuous, mode, IA_CSS_BINARY_MODE_COPY);
+			dev_dbg(atomisp_dev, "continue: !%d && %d && (%d != %d)\n",
+				candidate->enable.continuous, continuous,
+				mode, IA_CSS_BINARY_MODE_COPY);
 			continue;
 		}
 		if (striped && candidate->iterator.num_stripes == 1) {
-			dev_dbg(atomisp_dev,
-				"ia_css_binary_find() [%d] continue: binary is not striped\n",
-				__LINE__);
+			dev_dbg(atomisp_dev, "continue: binary is not striped\n");
 			continue;
 		}
 
@@ -1019,38 +1015,38 @@ int ia_css_binary_find(struct ia_css_binary_descr *descr, struct ia_css_binary *
 		    (mode != IA_CSS_BINARY_MODE_COPY) &&
 		    (mode != IA_CSS_BINARY_MODE_CAPTURE_PP) &&
 		    (mode != IA_CSS_BINARY_MODE_VF_PP)) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: (%d != %d)\n",
-				__LINE__, candidate->pipeline.isp_pipe_version, isp_pipe_version);
+			dev_dbg(atomisp_dev, "continue: (%d != %d)\n",
+				candidate->pipeline.isp_pipe_version, isp_pipe_version);
 			continue;
 		}
 		if (!candidate->enable.reduced_pipe && enable_reduced_pipe) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: !%d && %d\n",
-				__LINE__, candidate->enable.reduced_pipe, enable_reduced_pipe);
+			dev_dbg(atomisp_dev, "continue: !%d && %d\n",
+				candidate->enable.reduced_pipe, enable_reduced_pipe);
 			continue;
 		}
 		if (!candidate->enable.dvs_6axis && enable_dvs_6axis) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: !%d && %d\n",
-				__LINE__, candidate->enable.dvs_6axis, enable_dvs_6axis);
+			dev_dbg(atomisp_dev, "continue: !%d && %d\n",
+				candidate->enable.dvs_6axis, enable_dvs_6axis);
 			continue;
 		}
 		if (candidate->enable.high_speed && !enable_high_speed) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: %d && !%d\n",
-				__LINE__, candidate->enable.high_speed, enable_high_speed);
+			dev_dbg(atomisp_dev, "continue: %d && !%d\n",
+				candidate->enable.high_speed, enable_high_speed);
 			continue;
 		}
 		if (!candidate->enable.xnr && need_xnr) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: %d && !%d\n",
-				__LINE__, candidate->enable.xnr, need_xnr);
+			dev_dbg(atomisp_dev, "continue: %d && !%d\n",
+				candidate->enable.xnr, need_xnr);
 			continue;
 		}
 		if (!(candidate->enable.ds & 2) && enable_yuv_ds) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: !%d && %d\n",
-				__LINE__, ((candidate->enable.ds & 2) != 0), enable_yuv_ds);
+			dev_dbg(atomisp_dev, "continue: !%d && %d\n",
+				((candidate->enable.ds & 2) != 0), enable_yuv_ds);
 			continue;
 		}
 		if ((candidate->enable.ds & 2) && !enable_yuv_ds) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: %d && !%d\n",
-				__LINE__, ((candidate->enable.ds & 2) != 0), enable_yuv_ds);
+			dev_dbg(atomisp_dev, "continue: %d && !%d\n",
+				((candidate->enable.ds & 2) != 0), enable_yuv_ds);
 			continue;
 		}
 
@@ -1064,85 +1060,77 @@ int ia_css_binary_find(struct ia_css_binary_descr *descr, struct ia_css_binary *
 				       candidate->vf_dec.is_variable ||
 				       /* or more than one output pin. */
 				       xcandidate->num_output_pins > 1)) {
-			dev_dbg(atomisp_dev,
-				"ia_css_binary_find() [%d] continue: (%p != NULL) && !(%d || %d || (%d >%d))\n",
-				__LINE__, req_vf_info, candidate->enable.vf_veceven,
+			dev_dbg(atomisp_dev, "continue: (%p != NULL) && !(%d || %d || (%d >%d))\n",
+				req_vf_info, candidate->enable.vf_veceven,
 				candidate->vf_dec.is_variable, xcandidate->num_output_pins, 1);
 			continue;
 		}
 		if (!candidate->enable.dvs_envelope && need_dvs) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: !%d && %d\n",
-				__LINE__, candidate->enable.dvs_envelope, (int)need_dvs);
+			dev_dbg(atomisp_dev, "continue: !%d && %d\n",
+				candidate->enable.dvs_envelope, (int)need_dvs);
 			continue;
 		}
 		/* internal_res check considers input, output, and dvs envelope sizes */
 		ia_css_binary_internal_res(req_in_info, req_bds_out_info,
 					   req_bin_out_info, &dvs_env, candidate, &internal_res);
 		if (internal_res.width > candidate->internal.max_width) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: (%d > %d)\n",
-				__LINE__, internal_res.width, candidate->internal.max_width);
+			dev_dbg(atomisp_dev, "continue: (%d > %d)\n",
+				internal_res.width, candidate->internal.max_width);
 			continue;
 		}
 		if (internal_res.height > candidate->internal.max_height) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: (%d > %d)\n",
-				__LINE__, internal_res.height, candidate->internal.max_height);
+			dev_dbg(atomisp_dev, "continue: (%d > %d)\n",
+				internal_res.height, candidate->internal.max_height);
 			continue;
 		}
 		if (!candidate->enable.ds && need_ds && !(xcandidate->num_output_pins > 1)) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: !%d && %d\n",
-				__LINE__, candidate->enable.ds, (int)need_ds);
+			dev_dbg(atomisp_dev, "continue: !%d && %d\n",
+				candidate->enable.ds, (int)need_ds);
 			continue;
 		}
 		if (!candidate->enable.uds && !candidate->enable.dvs_6axis && need_dz) {
-			dev_dbg(atomisp_dev,
-				"ia_css_binary_find() [%d] continue: !%d && !%d && %d\n",
-				__LINE__, candidate->enable.uds, candidate->enable.dvs_6axis,
+			dev_dbg(atomisp_dev, "continue: !%d && !%d && %d\n",
+				candidate->enable.uds, candidate->enable.dvs_6axis,
 				(int)need_dz);
 			continue;
 		}
 		if (online && candidate->input.source == IA_CSS_BINARY_INPUT_MEMORY) {
-			dev_dbg(atomisp_dev,
-				"ia_css_binary_find() [%d] continue: %d && (%d == %d)\n",
-				__LINE__, online, candidate->input.source,
+			dev_dbg(atomisp_dev, "continue: %d && (%d == %d)\n",
+				online, candidate->input.source,
 				IA_CSS_BINARY_INPUT_MEMORY);
 			continue;
 		}
 		if (!online && candidate->input.source == IA_CSS_BINARY_INPUT_SENSOR) {
-			dev_dbg(atomisp_dev,
-				"ia_css_binary_find() [%d] continue: !%d && (%d == %d)\n",
-				__LINE__, online, candidate->input.source,
+			dev_dbg(atomisp_dev, "continue: !%d && (%d == %d)\n",
+				online, candidate->input.source,
 				IA_CSS_BINARY_INPUT_SENSOR);
 			continue;
 		}
 		if (req_bin_out_info->res.width < candidate->output.min_width ||
 		    req_bin_out_info->res.width > candidate->output.max_width) {
-			dev_dbg(atomisp_dev,
-				"ia_css_binary_find() [%d] continue: (%d > %d) || (%d < %d)\n",
-				__LINE__, req_bin_out_info->padded_width,
-				candidate->output.min_width, req_bin_out_info->padded_width,
-				candidate->output.max_width);
+			dev_dbg(atomisp_dev, "continue: (%d > %d) || (%d < %d)\n",
+				req_bin_out_info->padded_width, candidate->output.min_width,
+				req_bin_out_info->padded_width, candidate->output.max_width);
 			continue;
 		}
 		if (xcandidate->num_output_pins > 1 &&
 		    /* in case we have a second output pin, */
 		    req_vf_info) { /* and we need vf output. */
 			if (req_vf_info->res.width > candidate->output.max_width) {
-				dev_dbg(atomisp_dev,
-					"ia_css_binary_find() [%d] continue: (%d < %d)\n",
-					__LINE__, req_vf_info->res.width,
-					candidate->output.max_width);
+				dev_dbg(atomisp_dev, "continue: (%d < %d)\n",
+					req_vf_info->res.width, candidate->output.max_width);
 				continue;
 			}
 		}
 		if (req_in_info->padded_width > candidate->input.max_width) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: (%d > %d)\n",
-				__LINE__, req_in_info->padded_width, candidate->input.max_width);
+			dev_dbg(atomisp_dev, "continue: (%d > %d)\n",
+				req_in_info->padded_width, candidate->input.max_width);
 			continue;
 		}
 		if (!binary_supports_output_format(xcandidate, req_bin_out_info->format)) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: !%d\n",
-				__LINE__, binary_supports_output_format(xcandidate,
-									req_bin_out_info->format));
+			dev_dbg(atomisp_dev, "continue: !%d\n",
+				binary_supports_output_format(xcandidate,
+							      req_bin_out_info->format));
 			continue;
 		}
 		if (xcandidate->num_output_pins > 1 &&
@@ -1151,9 +1139,8 @@ int ia_css_binary_find(struct ia_css_binary_descr *descr, struct ia_css_binary *
 		    /* check if the required vf format
 		    is supported. */
 		    !binary_supports_output_format(xcandidate, req_vf_info->format)) {
-			dev_dbg(atomisp_dev,
-				"ia_css_binary_find() [%d] continue: (%d > %d) && (%p != NULL) && !%d\n",
-				__LINE__, xcandidate->num_output_pins, 1, req_vf_info,
+			dev_dbg(atomisp_dev, "continue: (%d > %d) && (%p != NULL) && !%d\n",
+				xcandidate->num_output_pins, 1, req_vf_info,
 				binary_supports_output_format(xcandidate, req_vf_info->format));
 			continue;
 		}
@@ -1162,9 +1149,8 @@ int ia_css_binary_find(struct ia_css_binary_descr *descr, struct ia_css_binary *
 		if (xcandidate->num_output_pins == 1 &&
 		    req_vf_info && candidate->enable.vf_veceven &&
 		    !binary_supports_vf_format(xcandidate, req_vf_info->format)) {
-			dev_dbg(atomisp_dev,
-				"ia_css_binary_find() [%d] continue: (%d == %d) && (%p != NULL) && %d && !%d\n",
-				__LINE__, xcandidate->num_output_pins, 1,
+			dev_dbg(atomisp_dev, "continue: (%d == %d) && (%p != NULL) && %d && !%d\n",
+				xcandidate->num_output_pins, 1,
 				req_vf_info, candidate->enable.vf_veceven,
 				binary_supports_vf_format(xcandidate, req_vf_info->format));
 			continue;
@@ -1174,31 +1160,28 @@ int ia_css_binary_find(struct ia_css_binary_descr *descr, struct ia_css_binary *
 		if (xcandidate->num_output_pins == 1 &&
 		    req_vf_info && candidate->enable.vf_veceven) { /* and we need vf output. */
 			if (req_vf_info->res.width > candidate->output.max_width) {
-				dev_dbg(atomisp_dev,
-					"ia_css_binary_find() [%d] continue: (%d < %d)\n",
-					__LINE__, req_vf_info->res.width,
-					candidate->output.max_width);
+				dev_dbg(atomisp_dev, "continue: (%d < %d)\n",
+					req_vf_info->res.width, candidate->output.max_width);
 				continue;
 			}
 		}
 
 		if (!supports_bds_factor(candidate->bds.supported_bds_factors,
 					 descr->required_bds_factor)) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
-				__LINE__, candidate->bds.supported_bds_factors,
-				descr->required_bds_factor);
+			dev_dbg(atomisp_dev, "continue: 0x%x & 0x%x)\n",
+				candidate->bds.supported_bds_factors, descr->required_bds_factor);
 			continue;
 		}
 
 		if (!candidate->enable.dpc && need_dpc) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
-				__LINE__, candidate->enable.dpc, descr->enable_dpc);
+			dev_dbg(atomisp_dev, "continue: 0x%x & 0x%x)\n",
+				candidate->enable.dpc, descr->enable_dpc);
 			continue;
 		}
 
 		if (candidate->uds.use_bci && enable_capture_pp_bli) {
-			dev_dbg(atomisp_dev, "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
-				__LINE__, candidate->uds.use_bci, descr->enable_capture_pp_bli);
+			dev_dbg(atomisp_dev, "continue: 0x%x & 0x%x)\n",
+				candidate->uds.use_bci, descr->enable_capture_pp_bli);
 			continue;
 		}
 
-- 
2.43.0
Re: [PATCH v3] media: atomisp: remove redundant prefix from dev_dbg calls
Posted by Andy Shevchenko 1 week, 5 days ago
On Wed, May 27, 2026 at 9:37 AM Jeongin Yeo <jeongin.yeo@luaberry.com> wrote:
>
> Remove the hardcoded function name and line number prefix from
> dev_dbg() output strings within ia_css_binary_find(). dev_dbg()
> can already emit the function name and line number via dynamic_debug's
> 'f' and 'l' flags, so embedding it in the format string is redundant.
>
> This resolves the EMBEDDED_FUNCTION_NAME checkpatch warnings without
> introducing __func__ to format strings.
>
> No functional changes.

LGTM,
Reviewed-by: Andy Shevchenko <andy@kernel.org>

-- 
With Best Regards,
Andy Shevchenko