Skip to contentSkip to conversation

media: staging: atomisp: Remove unnecessary return statement in bufq.c

PATCH Superseded Tomasz Unger 3 participants 14 messages Mar 10 – Mar 11 1 message not in the archive

Subsystems (4)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20260310-atomisp-remove-void-return-v2b-v3-0-3fdddab41271.ref@yahoo.pl

#1 lore raw

v3 cover media: staging: atomisp: Remove unnecessary return statements from void functions

---
Changes in v3:
- Extended cleanup to all 27 files in the driver containing redundant
'return;' statements at the end of void functions (as suggested by
Andy Shevchenko): inputfifo.c, bufq.c, ifmtr.c, frame.c, rx.c,
binary.c, ia_css_debug.c, mmu_public.h,
isp2400_input_system_private.h, hmm_bo.c, sh_css.c, sp_private.h, fifo_monitor_private.h, isp.c, input_formatter_private.h, irq.c,
mmu.c, fifo_monitor.c, gp_device.c, gdc.c, event_fifo_private.h,
isp_private.h, input_formatter.c, irq_private.h, gpio_private.h,
gp_device_private.h, atomisp_cmd.c
- Each removed 'return;' was verified to be at the end of a void function
- Compiled successfully: make M=drivers/staging/media/atomisp/
- Module loaded successfully in QEMU with Linux 7.0-rc3
- Link to v2: https://lore.kernel.org/r/20260310-atomisp-remove-void-return-v2b-v2-1-b0e73f498e25@yahoo.pl

Changes in v2:
- Fixed subject prefix to 'media: staging: atomisp:' (reported by media CI robot)
- Rebased on media-committers/next
- Verified with checkpatch.pl --strict: 0 errors, 0 warnings
- Compiled successfully: make M=drivers/staging/media/atomisp/
- Module loaded successfully in QEMU with Linux 7.0-rc2
- Link to v1: https://lore.kernel.org/r/20260305-atomisp-remove-void-return-v2b-v1-1-902e534ecb48@yahoo.pl

---
Tomasz Unger (28):
media: staging: atomisp: Remove unnecessary return statement in void function
media: staging: atomisp: Remove unnecessary return statements in inputfifo.c
media: staging: atomisp: Remove unnecessary return statement in bufq.c
media: staging: atomisp: Remove unnecessary return statement in ifmtr.c
media: staging: atomisp: Remove unnecessary return statements in frame.c
media: staging: atomisp: Remove unnecessary return statements in rx.c
media: staging: atomisp: Remove unnecessary return statement in binary.c
media: staging: atomisp: Remove unnecessary return statements in ia_css_debug.c
media: staging: atomisp: Remove unnecessary return statement in mmu_public.h
media: staging: atomisp: Remove unnecessary return statements in isp2400_input_system_private.h
media: staging: atomisp: Remove unnecessary return statements in hmm_bo.c
media: staging: atomisp: Remove unnecessary return statements in sh_css.c
media: staging: atomisp: Remove unnecessary return statements in sp_private.h
media: staging: atomisp: Remove unnecessary return statements in fifo_monitor_private.h
media: staging: atomisp: Remove unnecessary return statement in isp.c
media: staging: atomisp: Remove unnecessary return statement in input_formatter_private.h
media: staging: atomisp: Remove unnecessary return statements in irq.c
media: staging: atomisp: Remove unnecessary return statements in mmu.c
media: staging: atomisp: Remove unnecessary return statements in fifo_monitor.c
media: staging: atomisp: Remove unnecessary return statement in gp_device.c
media: staging: atomisp: Remove unnecessary return statements in gdc.c
media: staging: atomisp: Remove unnecessary return statement in event_fifo_private.h
media: staging: atomisp: Remove unnecessary return statements in isp_private.h
media: staging: atomisp: Remove unnecessary return statements in input_formatter.c
media: staging: atomisp: Remove unnecessary return statement in irq_private.h
media: staging: atomisp: Remove unnecessary return statement in gpio_private.h
media: staging: atomisp: Remove unnecessary return statement in gp_device_private.h
media: staging: atomisp: Remove unnecessary return statement in atomisp_cmd.c

 drivers/staging/media/atomisp/pci/atomisp_cmd.c          |  1 -
 .../pci/hive_isp_css_common/host/event_fifo_private.h    |  1 -
 .../atomisp/pci/hive_isp_css_common/host/fifo_monitor.c  |  3 ---
 .../pci/hive_isp_css_common/host/fifo_monitor_private.h  |  2 --
 .../media/atomisp/pci/hive_isp_css_common/host/gdc.c     |  2 --
 .../atomisp/pci/hive_isp_css_common/host/gp_device.c     |  1 -
 .../pci/hive_isp_css_common/host/gp_device_private.h     |  1 -
 .../atomisp/pci/hive_isp_css_common/host/gpio_private.h  |  1 -
 .../pci/hive_isp_css_common/host/input_formatter.c       |  5 -----
 .../hive_isp_css_common/host/input_formatter_private.h   |  1 -
 .../media/atomisp/pci/hive_isp_css_common/host/irq.c     |  8 --------
 .../atomisp/pci/hive_isp_css_common/host/irq_private.h   |  1 -
 .../media/atomisp/pci/hive_isp_css_common/host/isp.c     |  1 -
 .../atomisp/pci/hive_isp_css_common/host/isp_private.h   |  6 ------
 .../media/atomisp/pci/hive_isp_css_common/host/mmu.c     |  2 --
 .../atomisp/pci/hive_isp_css_common/host/sp_private.h    |  8 --------
 .../atomisp/pci/hive_isp_css_include/host/mmu_public.h   |  1 -
 drivers/staging/media/atomisp/pci/hmm/hmm_bo.c           |  4 ----
 .../media/atomisp/pci/isp2400_input_system_private.h     |  4 ----
 .../media/atomisp/pci/runtime/binary/src/binary.c        |  1 -
 .../staging/media/atomisp/pci/runtime/bufq/src/bufq.c    |  1 -
 .../media/atomisp/pci/runtime/debug/src/ia_css_debug.c   |  8 --------
 .../staging/media/atomisp/pci/runtime/frame/src/frame.c  |  4 ----
 .../staging/media/atomisp/pci/runtime/ifmtr/src/ifmtr.c  |  1 -
 .../media/atomisp/pci/runtime/inputfifo/src/inputfifo.c  | 16 ----------------
 drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c  |  4 ----
 drivers/staging/media/atomisp/pci/sh_css.c               |  2 --
 drivers/staging/media/atomisp/pci/sh_css_param_dvs.c     |  1 -
 28 files changed, 91 deletions(-)

---
base-commit: c24bad1b9ac3ee3a63dcdeaa082cf671a4be1345
change-id: 20260305-atomisp-remove-void-return-v2b-4ce912de212c

Best regards,

Signature · 1 line
Tomasz Unger <[email protected]>
#2 lore raw

PATCH v3 1/28 media: staging: atomisp: Remove unnecessary return statement in void function

Remove redundant 'return;' at the end of void function ia_css_dvs_statistics_get(). There are other similar occurrences in the driver that will be addressed in follow-up patches.

Found with checkpatch.pl --strict.

---
 drivers/staging/media/atomisp/pci/sh_css_param_dvs.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/media/atomisp/pci/sh_css_param_dvs.c +0 -1
index 9ccdb66de2df..3d2cb2d25fdb 100644
@@ -269,5 +269,4 @@ ia_css_dvs_statistics_get(enum dvs_statistics_type type,
 		ia_css_get_dvs2_statistics(host_stats->p_dvs2_statistics_host,
 					   isp_stats->p_dvs_statistics_isp);
 	}
-	return;
 }
Signature · 1 line
2.53.0
#3 lore raw

PATCH v3 2/28 media: staging: atomisp: Remove unnecessary return statements in inputfifo.c

In reply to Tomasz Unger

Remove redundant 'return;' statements at the end of void functions in inputfifo.c. Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 .../media/atomisp/pci/runtime/inputfifo/src/inputfifo.c  | 16 ----------------
 1 file changed, 16 deletions(-)
drivers/staging/media/atomisp/pci/runtime/inputfifo/src/inputfifo.c +0 -16
index 8e1efeb6372c..f0dcd839e33b 100644
@@ -88,7 +88,6 @@ _sh_css_fifo_snd(unsigned int token)
 	while (!can_event_send_token(STR2MIPI_EVENT_ID))
 		udelay(1);
 	event_send_token(STR2MIPI_EVENT_ID, token);
-	return;
 }
 
 static void inputfifo_send_data_a(
@@ -98,7 +97,6 @@ static void inputfifo_send_data_a(
 	unsigned int token = (1 << HIVE_STR_TO_MIPI_VALID_A_BIT) |
 			     (data << HIVE_STR_TO_MIPI_DATA_A_LSB);
 	_sh_css_fifo_snd(token);
-	return;
 }
 
 static void inputfifo_send_data_b(
@@ -108,7 +106,6 @@ static void inputfifo_send_data_b(
 	unsigned int token = (1 << HIVE_STR_TO_MIPI_VALID_B_BIT) |
 			     (data << _HIVE_STR_TO_MIPI_DATA_B_LSB);
 	_sh_css_fifo_snd(token);
-	return;
 }
 
 static void inputfifo_send_data(
@@ -121,7 +118,6 @@ static void inputfifo_send_data(
 			      (a << HIVE_STR_TO_MIPI_DATA_A_LSB) |
 			      (b << _HIVE_STR_TO_MIPI_DATA_B_LSB));
 	_sh_css_fifo_snd(token);
-	return;
 }
 
 static void inputfifo_send_sol(void)
@@ -131,7 +127,6 @@ static void inputfifo_send_sol(void)
 				1 << HIVE_STR_TO_MIPI_SOL_BIT);
 
 	_sh_css_fifo_snd(token);
-	return;
 }
 
 static void inputfifo_send_eol(void)
@@ -140,7 +135,6 @@ static void inputfifo_send_eol(void)
 	hrt_data	token = inputfifo_wrap_marker(
 				1 << HIVE_STR_TO_MIPI_EOL_BIT);
 	_sh_css_fifo_snd(token);
-	return;
 }
 
 static void inputfifo_send_sof(void)
@@ -150,7 +144,6 @@ static void inputfifo_send_sof(void)
 				1 << HIVE_STR_TO_MIPI_SOF_BIT);
 
 	_sh_css_fifo_snd(token);
-	return;
 }
 
 static void inputfifo_send_eof(void)
@@ -159,7 +152,6 @@ static void inputfifo_send_eof(void)
 	hrt_data	token = inputfifo_wrap_marker(
 				1 << HIVE_STR_TO_MIPI_EOF_BIT);
 	_sh_css_fifo_snd(token);
-	return;
 }
 
 static void inputfifo_send_ch_id_and_fmt_type(
@@ -177,7 +169,6 @@ static void inputfifo_send_ch_id_and_fmt_type(
 	 */
 	token = inputfifo_wrap_marker(0);
 	_sh_css_fifo_snd(token);
-	return;
 }
 
 static void inputfifo_send_empty_token(void)
@@ -186,7 +177,6 @@ static void inputfifo_send_empty_token(void)
 	hrt_data	token = inputfifo_wrap_marker(0);
 
 	_sh_css_fifo_snd(token);
-	return;
 }
 
 static void inputfifo_start_frame(
@@ -196,7 +186,6 @@ static void inputfifo_start_frame(
 {
 	inputfifo_send_ch_id_and_fmt_type(ch_id, fmt_type);
 	inputfifo_send_sof();
-	return;
 }
 
 static void inputfifo_end_frame(
@@ -207,7 +196,6 @@ static void inputfifo_end_frame(
 	for (i = 0; i < marker_cycles; i++)
 		inputfifo_send_empty_token();
 	inputfifo_send_eof();
-	return;
 }
 
 static void inputfifo_send_line2(
@@ -297,7 +285,6 @@ static void inputfifo_send_line2(
 	for (i = 0; i < hblank_cycles; i++)
 		inputfifo_send_empty_token();
 	inputfifo_send_eol();
-	return;
 }
 
 static void
@@ -377,7 +364,6 @@ static void inputfifo_send_frame(
 		}
 	}
 	inputfifo_end_frame(marker_cycles);
-	return;
 }
 
 static enum inputfifo_mipi_data_type inputfifo_determine_type(
@@ -453,7 +439,6 @@ void ia_css_inputfifo_start_frame(
 	s2mi->streaming = true;
 
 	inputfifo_start_frame(ch_id, s2mi->fmt_type);
-	return;
 }
 
 void ia_css_inputfifo_send_line(
@@ -516,5 +501,4 @@ void ia_css_inputfifo_end_frame(
 	inputfifo_end_frame(s2mi->marker_cycles);
 
 	s2mi->streaming = false;
-	return;
 }
Signature · 1 line
2.53.0
#4 lore raw

PATCH v3 3/28 media: staging: atomisp: Remove unnecessary return statement in bufq.c

In reply to Tomasz Unger

Remove redundant 'return;' statement at the end of void function map_buffer_type_to_queue_id(). Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 drivers/staging/media/atomisp/pci/runtime/bufq/src/bufq.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/media/atomisp/pci/runtime/bufq/src/bufq.c +0 -1
index 0f0d16f4ce7c..51f7c9d6f378 100644
@@ -176,7 +176,6 @@ static void map_buffer_type_to_queue_id(
 	}
 
 	assert(i != SH_CSS_MAX_NUM_QUEUES);
-	return;
 }
 
 static void unmap_buffer_type_to_queue_id(
Signature · 1 line
2.53.0
#5 lore raw

PATCH v3 4/28 media: staging: atomisp: Remove unnecessary return statement in ifmtr.c

In reply to Tomasz Unger

Remove redundant 'return;' statement at the end of void function ifmtr_set_if_blocking_mode(). Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 drivers/staging/media/atomisp/pci/runtime/ifmtr/src/ifmtr.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/media/atomisp/pci/runtime/ifmtr/src/ifmtr.c +0 -1
index 50b0b31d734a..31dd3f99e28e 100644
@@ -472,7 +472,6 @@ static void ifmtr_set_if_blocking_mode(
 		}
 	}
 
-	return;
 }
 
 static int ifmtr_start_column(
Signature · 1 line
2.53.0
#6 lore raw

Re: [PATCH v3 04/28] media: staging: atomisp: Remove unnecessary return statement in ifmtr.c

Quoted 16 lines · Tomasz Unger

Remove redundant 'return;' statement at the end of void function ifmtr_set_if_blocking_mode(). Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 drivers/staging/media/atomisp/pci/runtime/ifmtr/src/ifmtr.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/media/atomisp/pci/runtime/ifmtr/src/ifmtr.c +0 -0
index 50b0b31d734a..31dd3f99e28e 100644

drivers/staging/media/atomisp/pci/runtime/ifmtr/src/ifmtr.c static void ifmtr_set_if_blocking_mode( · line 475

Quoted 4 lines
drivers/staging/media/atomisp/pci/runtime/ifmtr/src/ifmtr.c +0 -1
@@ -472,7 +472,6 @@ static void ifmtr_set_if_blocking_mode(
 		}
 	}
 
-	return;

Delete the blank line as well.

regards,
dan carpenter

Quoted 4 lines
drivers/staging/media/atomisp/pci/runtime/ifmtr/src/ifmtr.c +0 -0
 }
 
 static int ifmtr_start_column(
#7 lore raw

PATCH v3 5/28 media: staging: atomisp: Remove unnecessary return statements in frame.c

In reply to Tomasz Unger

Remove redundant 'return;' statements at the end of void functions in frame.c. Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c +0 -4
index 8614efc28b19..ae952df03cc6 100644
@@ -525,7 +525,6 @@ static void frame_init_nv_planes(struct ia_css_frame *frame,
 	frame_init_plane(&frame->planes.nv.y, y_width, y_stride, y_height, 0);
 	frame_init_plane(&frame->planes.nv.uv, uv_width,
 			 uv_stride, uv_height, y_bytes);
-	return;
 }
 
 static void frame_init_yuv_planes(struct ia_css_frame *frame,
@@ -558,7 +557,6 @@ static void frame_init_yuv_planes(struct ia_css_frame *frame,
 		frame_init_plane(&frame->planes.yuv.v, uv_width, uv_stride,
 				 uv_height, y_bytes + uv_bytes);
 	}
-	return;
 }
 
 static void frame_init_rgb_planes(struct ia_css_frame *frame,
@@ -575,7 +573,6 @@ static void frame_init_rgb_planes(struct ia_css_frame *frame,
 			 width, stride, height, 1 * bytes);
 	frame_init_plane(&frame->planes.planar_rgb.b,
 			 width, stride, height, 2 * bytes);
-	return;
 }
 
 static void frame_init_qplane6_planes(struct ia_css_frame *frame)
@@ -599,7 +596,6 @@ static void frame_init_qplane6_planes(struct ia_css_frame *frame)
 			 width, stride, height, 4 * bytes);
 	frame_init_plane(&frame->planes.plane6.b_at_r,
 			 width, stride, height, 5 * bytes);
-	return;
 }
 
 static int frame_allocate_buffer_data(struct ia_css_frame *frame)
Signature · 1 line
2.53.0
#8 lore raw

PATCH v3 6/28 media: staging: atomisp: Remove unnecessary return statements in rx.c

In reply to Tomasz Unger

Remove redundant 'return;' statements at the end of void functions in rx.c. Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +0 -4
index 9cfb8bc97e24..bf9be11335d4 100644
@@ -44,7 +44,6 @@ void ia_css_isys_rx_enable_all_interrupts(enum mipi_port_id port)
 	 */
 	ia_css_irq_enable(IA_CSS_IRQ_INFO_CSS_RECEIVER_ERROR, true);
 
-	return;
 }
 
 /* This function converts between the enum used on the CSS API and the
@@ -197,7 +196,6 @@ void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port,
 				port,
 				_HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX, bits);
 
-	return;
 }
 
 static int ia_css_isys_2400_set_fmt_type(enum atomisp_input_format input_format,
@@ -638,7 +636,6 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config,
 	 */
 	input_system_reg_store(INPUT_SYSTEM0_ID, 0x207, 1);
 
-	return;
 }
 
 void ia_css_isys_rx_disable(void)
@@ -650,5 +647,4 @@ void ia_css_isys_rx_disable(void)
 					_HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX,
 					false);
 	}
-	return;
 }
Signature · 1 line
2.53.0
#9 lore raw

Re: [PATCH v3 06/28] media: staging: atomisp: Remove unnecessary return statements in rx.c

Quoted 16 lines · Tomasz Unger

Remove redundant 'return;' statements at the end of void functions in rx.c. Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +0 -0
index 9cfb8bc97e24..bf9be11335d4 100644

drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c void ia_css_isys_rx_enable_all_interrupts(enum mipi_port_id port) · line 47

Quoted 4 lines
drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +0 -1
@@ -44,7 +44,6 @@ void ia_css_isys_rx_enable_all_interrupts(enum mipi_port_id port)
 	 */
 	ia_css_irq_enable(IA_CSS_IRQ_INFO_CSS_RECEIVER_ERROR, true);
 
-	return;

Delete the blank line.

drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port, · line 200

Quoted 8 lines
drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +0 -1
 }
 
 /* This function converts between the enum used on the CSS API and the
@@ -197,7 +196,6 @@ void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port,
 				port,
 				_HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX, bits);
 
-	return;

Same.

drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c void ia_css_isys_rx_configure(const rx_cfg_t *config, · line 641

Quoted 8 lines
drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +0 -1
 }
 
 static int ia_css_isys_2400_set_fmt_type(enum atomisp_input_format input_format,
@@ -638,7 +636,6 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config,
 	 */
 	input_system_reg_store(INPUT_SYSTEM0_ID, 0x207, 1);
 
-	return;

Same.

regards,
dan carpenter

#10 lore raw

PATCH v3 7/28 media: staging: atomisp: Remove unnecessary return statement in binary.c

In reply to Tomasz Unger

Remove redundant 'return;' statement at the end of void function ia_css_binary_dvs_stat_grid_info(). Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c +0 -1
index af93ca96747c..c3645fc074e4 100644
@@ -344,7 +344,6 @@ ia_css_binary_dvs_stat_grid_info(
 {
 	(void)pipe;
 	sh_css_binary_common_grid_info(binary, info);
-	return;
 }
 
 int
Signature · 1 line
2.53.0
#11 lore raw

PATCH v3 8/28 media: staging: atomisp: Remove unnecessary return statements in ia_css_debug.c

In reply to Tomasz Unger

Remove redundant 'return;' statements at the end of void functions in ia_css_debug.c. Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 .../staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c    | 8 --------
 1 file changed, 8 deletions(-)
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c +0 -8
index b411ca2f415e..2e0a13938d89 100644
@@ -136,7 +136,6 @@ void ia_css_debug_dtrace(unsigned int level, const char *fmt, ...)
 void ia_css_debug_set_dtrace_level(const unsigned int trace_level)
 {
 	dbg_level = trace_level;
-	return;
 }
 
 unsigned int ia_css_debug_get_dtrace_level(void)
@@ -315,7 +314,6 @@ static void debug_print_fifo_channel_state(const fifo_channel_state_t *state,
 			    state->fifo_valid);
 	ia_css_debug_dtrace(2, "\t%-32s: %d\n", "sink accept",
 			    state->sink_accept);
-	return;
 }
 
 void ia_css_debug_dump_pif_a_isp_fifo_state(void)
@@ -364,7 +362,6 @@ void ia_css_debug_dump_all_fifo_state(void)
 	for (i = 0; i < N_FIFO_CHANNEL; i++)
 		debug_print_fifo_channel_state(&state.fifo_channels[i],
 					       "squepfstqkt");
-	return;
 }
 
 static void debug_binary_info_print(const struct ia_css_binary_xinfo *info)
@@ -386,7 +383,6 @@ static void debug_binary_info_print(const struct ia_css_binary_xinfo *info)
 	ia_css_debug_dtrace(2, "enable_uds = %d\n", info->sp.enable.uds);
 	ia_css_debug_dtrace(2, "enable ds = %d\n", info->sp.enable.ds);
 	ia_css_debug_dtrace(2, "s3atbl_use_dmem = %d\n", info->sp.s3a.s3atbl_use_dmem);
-	return;
 }
 
 void ia_css_debug_binary_print(const struct ia_css_binary *bi)
@@ -441,7 +437,6 @@ void ia_css_debug_binary_print(const struct ia_css_binary *bi)
 			    bi->sctbl_width_per_color);
 	ia_css_debug_dtrace(2, "s3atbl_width = %d\n", bi->s3atbl_width);
 	ia_css_debug_dtrace(2, "s3atbl_height = %d\n", bi->s3atbl_height);
-	return;
 }
 
 void ia_css_debug_frame_print(const struct ia_css_frame *frame,
@@ -526,7 +521,6 @@ void ia_css_debug_frame_print(const struct ia_css_frame *frame,
 		ia_css_debug_dtrace(2, "  unknown frame type\n");
 		break;
 	}
-	return;
 }
 
 #if SP_DEBUG != SP_DEBUG_NONE
@@ -809,7 +803,6 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
 
 #if SP_DEBUG != SP_DEBUG_NONE
 
-	return;
 }
 #endif
 
@@ -823,7 +816,6 @@ void ia_css_debug_dump_sp_sw_debug_info(void)
 #endif
 	ia_css_bufq_dump_queue_info();
 	ia_css_pipeline_dump_thread_map_info();
-	return;
 }
 
 /* this function is for debug use, it can make SP go to sleep
Signature · 1 line
2.53.0
#12 lore raw

Re: [PATCH v3 08/28] media: staging: atomisp: Remove unnecessary return statements in ia_css_debug.c

drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state · line 808

Quoted 8 lines · Tomasz Unger
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c +0 -1
@@ -809,7 +803,6 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
 
 #if SP_DEBUG != SP_DEBUG_NONE
 
-	return;
 }
 #endif
 

After you write your patch, then re-run checkpatch.pl -f on the file and it will catch these extra blank lines.

regards,
dan carpenter

#13 lore raw

PATCH v3 9/28 media: staging: atomisp: Remove unnecessary return statement in mmu_public.h

In reply to Tomasz Unger

Remove redundant 'return;' statement at the end of void function mmu_reg_store(). Void functions do not need an explicit return statement at the end.

Found with checkpatch.pl --strict.

---
 drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h +0 -1
index 1a435a348318..2fc137ef46da 100644
@@ -63,7 +63,6 @@ static inline void mmu_reg_store(
 	assert(ID < N_MMU_ID);
 	assert(MMU_BASE[ID] != (hrt_address) - 1);
 	ia_css_device_store_uint32(MMU_BASE[ID] + reg * sizeof(hrt_data), value);
-	return;
 }
 
 /*! Read from a control register of MMU[ID]
Signature · 1 line
2.53.0
#14 lore raw

Re: [PATCH v3 00/28] media: staging: atomisp: Remove unnecessary return statements from void functions

In reply to Tomasz Unger
Quoted 16 lines · Tomasz Unger

---
Changes in v3:
- Extended cleanup to all 27 files in the driver containing redundant
'return;' statements at the end of void functions (as suggested by
Andy Shevchenko): inputfifo.c, bufq.c, ifmtr.c, frame.c, rx.c,
binary.c, ia_css_debug.c, mmu_public.h,
isp2400_input_system_private.h, hmm_bo.c, sh_css.c, sp_private.h, fifo_monitor_private.h, isp.c, input_formatter_private.h, irq.c,
mmu.c, fifo_monitor.c, gp_device.c, gdc.c, event_fifo_private.h,
isp_private.h, input_formatter.c, irq_private.h, gpio_private.h,
gp_device_private.h, atomisp_cmd.c
- Each removed 'return;' was verified to be at the end of a void function
- Compiled successfully: make M=drivers/staging/media/atomisp/
- Module loaded successfully in QEMU with Linux 7.0-rc3
- Link to v2: https://lore.kernel.org/r/20260310-atomisp-remove-void-return-v2b-v2-1-b0e73f498e25@yahoo.pl

You sent the series 3 times and all of the times it's not sent in full. Besides that it must not be split by file! This kind of change is okay to have in one patch.

Signature · 2 lines
With Best Regards,
Andy Shevchenko