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]
Message-ID: <20200918092708.21570-1-zhengyongjun3@huawei.com>
Date:   Fri, 18 Sep 2020 17:27:08 +0800
From:   Zheng Yongjun <zhengyongjun3@...wei.com>
To:     <patrik.r.jakobsson@...il.com>, <airlied@...ux.ie>,
        <daniel@...ll.ch>, <dri-devel@...ts.freedesktop.org>,
        <linux-kernel@...r.kernel.org>
CC:     Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH -next] gpu: gma500: Remove set but not used variable

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/gma500/mmu.c: In function psb_mmu_insert_pfn_sequence:
drivers/gpu/drm/gma500/mmu.c:660:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c: In function get_clock:
drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c:69:11: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c: In function get_data:
drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c:83:11: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

these variable is never used, so remove it or check it's return value.

Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
---
 drivers/gpu/drm/gma500/mmu.c               | 2 +-
 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/gma500/mmu.c b/drivers/gpu/drm/gma500/mmu.c
index 505044c9a673..6ce842d05a44 100644
--- a/drivers/gpu/drm/gma500/mmu.c
+++ b/drivers/gpu/drm/gma500/mmu.c
@@ -690,7 +690,7 @@ int psb_mmu_insert_pfn_sequence(struct psb_mmu_pd *pd, uint32_t start_pfn,
 	if (pd->hw_context != -1)
 		psb_mmu_flush(pd->driver);
 
-	return 0;
+	return ret;
 }
 
 int psb_mmu_insert_pages(struct psb_mmu_pd *pd, struct page **pages,
diff --git a/drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c b/drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c
index baaf8212e01d..4d660868d76f 100644
--- a/drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c
+++ b/drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c
@@ -66,12 +66,12 @@
 static int get_clock(void *data)
 {
 	struct psb_intel_i2c_chan *chan = data;
-	u32 val, tmp;
+	u32 val;
 
 	val = LPC_READ_REG(chan, RGIO);
 	val |= GPIO_CLOCK;
 	LPC_WRITE_REG(chan, RGIO, val);
-	tmp = LPC_READ_REG(chan, RGLVL);
+	LPC_READ_REG(chan, RGLVL);
 	val = (LPC_READ_REG(chan, RGLVL) & GPIO_CLOCK) ? 1 : 0;
 
 	return val;
@@ -80,12 +80,12 @@ static int get_clock(void *data)
 static int get_data(void *data)
 {
 	struct psb_intel_i2c_chan *chan = data;
-	u32 val, tmp;
+	u32 val;
 
 	val = LPC_READ_REG(chan, RGIO);
 	val |= GPIO_DATA;
 	LPC_WRITE_REG(chan, RGIO, val);
-	tmp = LPC_READ_REG(chan, RGLVL);
+	LPC_READ_REG(chan, RGLVL);
 	val = (LPC_READ_REG(chan, RGLVL) & GPIO_DATA) ? 1 : 0;
 
 	return val;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ