Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH] staging: sm750fb: remove unnecessary initializations
@ 2026-05-04 20:46 Ahmet Sezgin Duran
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmet Sezgin Duran @ 2026-05-04 20:46 UTC (permalink / raw)
  To: gregkh; +Cc: linux-fbdev, linux-staging, linux-kernel, Ahmet Sezgin Duran

Remove two instances of `ret = 0` initializations since the variable
is overridden unconditionally before being used.

Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
 drivers/staging/sm750fb/sm750_hw.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index beef05ded98d..780fe6c391d3 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -29,8 +29,6 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
 {
 	int ret;
 
-	ret = 0;
-
 	sm750_dev->vidreg_start = pci_resource_start(pdev, 1);
 	sm750_dev->vidreg_size = SZ_2M;
 
@@ -243,7 +241,6 @@ int hw_sm750_crtc_set_mode(struct lynxfb_crtc *crtc,
 	struct sm750_dev *sm750_dev;
 	struct lynxfb_par *par;
 
-	ret = 0;
 	par = container_of(crtc, struct lynxfb_par, crtc);
 	sm750_dev = par->dev;
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] staging: sm750fb: remove unnecessary initializations
@ 2026-05-11 17:17 Ahmet Sezgin Duran
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmet Sezgin Duran @ 2026-05-11 17:17 UTC (permalink / raw)
  To: gregkh; +Cc: linux-fbdev, linux-staging, linux-kernel, Ahmet Sezgin Duran

Remove two instances of `de_ctrl = 0` initializations since the
variable is overridden unconditionally before being used.

Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
 drivers/staging/sm750fb/sm750_accel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index ec2f0a6aa57d..5ba1af274730 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -159,7 +159,6 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 
 	direction = LEFT_TO_RIGHT;
 	/* Direction of ROP2 operation: 1 = Left to Right, (-1) = Right to Left */
-	de_ctrl = 0;
 
 	/* If source and destination are the same surface, need to check for overlay cases */
 	if (source_base == dest_base && source_pitch == dest_pitch) {
@@ -326,7 +325,7 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *src_buf,
 	unsigned int bytes_per_scan;
 	unsigned int words_per_scan;
 	unsigned int bytes_remain;
-	unsigned int de_ctrl = 0;
+	unsigned int de_ctrl;
 	unsigned char remain[4];
 	int i, j;
 	int ret;
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-11 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04 20:46 [PATCH] staging: sm750fb: remove unnecessary initializations Ahmet Sezgin Duran
  -- strict thread matches above, loose matches on Subject: below --
2026-05-11 17:17 Ahmet Sezgin Duran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox