lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 Oct 2023 13:13:37 +0300
From:   Dorcas AnonoLitunya <anonolitunya@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     anonolitunya@...il.com, outreachy@...ts.linux.dev,
        julia.lawall@...ia.fr, dan.carpenter@...aro.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Sudip Mukherjee <sudipm.mukherjee@...il.com>,
        Teddy Wang <teddy.wang@...iconmotion.com>,
        linux-fbdev@...r.kernel.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: [PATCH v2 2/2] staging: sm750fb: Remove unused return variable in program_mode_registers()

Drops variable ret as it is unused in the code. This therefore modifies
the return type of program_mode_registers() to void from int since the
return value is being ignored in all function calls. This improves code
readability and maintainability.

Suggested-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Dorcas AnonoLitunya <anonolitunya@...il.com>
---
Changes in v2:
- Drop variable 'ret' entirely as it is unused.
Suggested-by: Julia Lawall <julia.lawall@...ia.fr>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Dan Carpenter <dan.carpenter@...aro.org>

 drivers/staging/sm750fb/ddk750_mode.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
index 83ace6cc9583..4278f9a826ab 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -73,10 +73,9 @@ display_control_adjust_sm750le(struct mode_parameter *mode_param,
 }
 
 /* only timing related registers will be  programed */
-static int program_mode_registers(struct mode_parameter *mode_param,
-				  struct pll_value *pll)
+static void program_mode_registers(struct mode_parameter *mode_param,
+				   struct pll_value *pll)
 {
-	int ret = 0;
 	int cnt = 0;
 	unsigned int tmp, reg;
 
@@ -199,10 +198,7 @@ static int program_mode_registers(struct mode_parameter *mode_param,
 				break;
 			poke32(PANEL_DISPLAY_CTRL, tmp | reg);
 		}
-	} else {
-		ret = -1;
 	}
-	return ret;
 }
 
 int ddk750_set_mode_timing(struct mode_parameter *parm, enum clock_type clock)
-- 
2.42.0.345.gaab89be2eb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ