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>] [day] [month] [year] [list]
Date:   Fri, 30 Apr 2021 17:22:32 +0800
From:   Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To:     airlied@...hat.com
Cc:     tzimmermann@...e.de, airlied@...ux.ie, daniel@...ll.ch,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] drm/mgag200: Remove redundant assignment to status and clock

Variable status is set to zero but this value is never read as
it is overwritten with a new value later on,clock is being assigned
a value from a calculation however the variable is never read,hence
these are redundant assignments that can be removed.

Clean up the following clang-analyzer warning:

drivers/gpu/drm/mgag200/mgag200_mode.c:284:3: warning: Value stored to
'clock' is never read [clang-analyzer-deadcode.DeadStores].

drivers/gpu/drm/mgag200/mgag200_mode.c:98:2: warning: Value stored to
'status' is never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
 drivers/gpu/drm/mgag200/mgag200_mode.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index cece3e5..c4d5be8 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -95,7 +95,6 @@ static inline void mga_wait_vsync(struct mga_device *mdev)
 		status = RREG32(MGAREG_Status);
 	} while ((status & 0x08) && time_before(jiffies, timeout));
 	timeout = jiffies + HZ/10;
-	status = 0;
 	do {
 		status = RREG32(MGAREG_Status);
 	} while (!(status & 0x08) && time_before(jiffies, timeout));
@@ -280,8 +279,6 @@ static int mga_g200se_set_plls(struct mga_device *mdev, long clock)
 
 		p |= (fvv << 4);
 		m |= 0x80;
-
-		clock = clock / 2;
 	}
 
 	if (delta > permitteddelta) {
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ