Skip to contentSkip to conversation

staging: sm750fb: Remove unused return value in display_control_adjust_sm750le()

PATCH In review Dorcas AnonoLitunya 2 participants 2 messages Nov 1, 2023 – Nov 23, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: sm750fb: Remove unused return value in display_control_adjust_sm750le()

Modifies the return type of display_control_adjust_sm750le() to void from unsigned long as the return value is being ignored in all subsequent function calls.

This improves code readability and maintainability.

---

Changes in v3:
- Rebase patch to apply against latest branch

 drivers/staging/sm750fb/ddk750_mode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/sm750fb/ddk750_mode.c +1 -3
index e1f20379431c..4278f9a826ab 100644
@@ -13,7 +13,7 @@
  * HW only supports 7 predefined pixel clocks, and clock select is
  * in bit 29:27 of Display Control register.
  */
-static unsigned long
+static void
 display_control_adjust_sm750le(struct mode_parameter *mode_param,
 			       unsigned long disp_control)
 {
@@ -70,8 +70,6 @@ display_control_adjust_sm750le(struct mode_parameter *mode_param,
 	disp_control |= DISPLAY_CTRL_CLOCK_PHASE;
 
 	poke32(CRT_DISPLAY_CTRL, disp_control);
-
-	return disp_control;
 }
 
 /* only timing related registers will be  programed */
Signature · 1 line
2.42.0.345.gaab89be2eb
maintainer
#1 lore raw
Quoted 42 lines · Dorcas AnonoLitunya

Modifies the return type of display_control_adjust_sm750le() to void from unsigned long as the return value is being ignored in all subsequent function calls.

This improves code readability and maintainability.

---

Changes in v3:
- Rebase patch to apply against latest branch

 drivers/staging/sm750fb/ddk750_mode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/sm750fb/ddk750_mode.c +1 -3
index e1f20379431c..4278f9a826ab 100644
@@ -13,7 +13,7 @@
  * HW only supports 7 predefined pixel clocks, and clock select is
  * in bit 29:27 of Display Control register.
  */
-static unsigned long
+static void
 display_control_adjust_sm750le(struct mode_parameter *mode_param,
 			       unsigned long disp_control)
 {
@@ -70,8 +70,6 @@ display_control_adjust_sm750le(struct mode_parameter *mode_param,
 	disp_control |= DISPLAY_CTRL_CLOCK_PHASE;
 
 	poke32(CRT_DISPLAY_CTRL, disp_control);
-
-	return disp_control;
 }
 
 /* only timing related registers will be  programed */
Signature · 1 line
2.42.0.345.gaab89be2eb

Does not apply to my current tree :(