Patchwork [U-Boot,02/10] drivers/mtd/onenand/samsung.c: Fix GCC 4.6 warning

login
register
mail settings
Submitter Anatolij Gustschin
Date Nov. 19, 2011, 11:12 p.m.
Message ID <1321744338-13207-3-git-send-email-agust@denx.de>
Download mbox | patch
Permalink /patch/126625/
State Accepted
Commit 67fad9f69d3b96a55282a8f868b7c52397aa5cc3
Headers show

Comments

Anatolij Gustschin - Nov. 19, 2011, 11:12 p.m.
Fix:
samsung.c: In function 's3c_onenand_check_lock_status':
samsung.c:486:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/mtd/onenand/samsung.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Heiko Schocher - Nov. 23, 2011, 7:20 a.m.
Hello Anatolij,

Anatolij Gustschin wrote:
> Fix:
> samsung.c: In function 's3c_onenand_check_lock_status':
> samsung.c:486:6: warning: variable 'tmp' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  drivers/mtd/onenand/samsung.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Applied to u-boot-staging hs@denx.de

Thanks!

bye,
Heiko

Patch

diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index 20b4912..ff59064 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -483,12 +483,11 @@  static void s3c_onenand_check_lock_status(struct mtd_info *mtd)
 {
 	struct onenand_chip *this = mtd->priv;
 	unsigned int block, end;
-	int tmp;
 
 	end = this->chipsize >> this->erase_shift;
 
 	for (block = 0; block < end; block++) {
-		tmp = s3c_read_cmd(CMD_MAP_01(onenand->mem_addr(block, 0, 0)));
+		s3c_read_cmd(CMD_MAP_01(onenand->mem_addr(block, 0, 0)));
 
 		if (readl(&onenand->reg->int_err_stat) & LOCKED_BLK) {
 			printf("block %d is write-protected!\n", block);