* [PATCH v3] staging: sm750fb: Remove unused return value in display_control_adjust_sm750le()
@ 2023-11-01 15:21 Dorcas AnonoLitunya
2023-11-23 12:48 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Dorcas AnonoLitunya @ 2023-11-01 15:21 UTC (permalink / raw)
To: gregkh
Cc: anonolitunya, outreachy, julia.lawall, Sudip Mukherjee,
Teddy Wang, linux-fbdev, linux-staging, linux-kernel
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>
---
Changes in v3:
- Rebase patch to apply against latest branch
drivers/staging/sm750fb/ddk750_mode.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
index e1f20379431c..4278f9a826ab 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 */
--
2.42.0.345.gaab89be2eb
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] staging: sm750fb: Remove unused return value in display_control_adjust_sm750le()
2023-11-01 15:21 [PATCH v3] staging: sm750fb: Remove unused return value in display_control_adjust_sm750le() Dorcas AnonoLitunya
@ 2023-11-23 12:48 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2023-11-23 12:48 UTC (permalink / raw)
To: Dorcas AnonoLitunya
Cc: outreachy, julia.lawall, Sudip Mukherjee, Teddy Wang, linux-fbdev,
linux-staging, linux-kernel
On Wed, Nov 01, 2023 at 06:21:34PM +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>
> ---
>
> Changes in v3:
> - Rebase patch to apply against latest branch
>
> drivers/staging/sm750fb/ddk750_mode.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
> index e1f20379431c..4278f9a826ab 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 */
> --
> 2.42.0.345.gaab89be2eb
>
>
Does not apply to my current tree :(
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-23 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 15:21 [PATCH v3] staging: sm750fb: Remove unused return value in display_control_adjust_sm750le() Dorcas AnonoLitunya
2023-11-23 12:48 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox