diff mbox series

[v2,1/2] staging: sm750fb: Remove unused return value in display_control_adjust_sm750le()

Message ID 20231019101348.22076-2-anonolitunya@gmail.com
State Superseded
Headers show
Series [v2,1/2] staging: sm750fb: Remove unused return value in display_control_adjust_sm750le() | expand

Commit Message

Dorcas Litunya Oct. 19, 2023, 10:13 a.m. UTC
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.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Dorcas AnonoLitunya <anonolitunya@gmail.com>
---
 drivers/staging/sm750fb/ddk750_mode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Dorcas Litunya Nov. 1, 2023, 3:36 p.m. UTC | #1
On 21/10/2023 13:01, Greg Kroah-Hartman wrote:
> On Thu, Oct 19, 2023 at 01:13:36PM +0300, Dorcas AnonoLitunya wrote:
>> 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.
>>
>> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Signed-off-by: Dorcas AnonoLitunya <anonolitunya@gmail.com>
>> ---
>>   drivers/staging/sm750fb/ddk750_mode.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
> This patch doesn't apply against my latest branch.  Please rebase it and
> resend.
>
> thanks,
>
> greg k-h


Hi Greg,

Sorry for the delay. Was occupied on the project starter tasks. I have 
rebased the patch and resent it. Thanks!


Dorcas
diff mbox series

Patch

diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
index bcdd291d25c9..83ace6cc9583 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -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 */