Patchwork [U-Boot,02/12] drivers/mtd/dataflash.c: Fix GCC 4.6 warning

login
register
mail settings
Submitter Anatolij Gustschin
Date Nov. 15, 2011, 11:20 p.m.
Message ID <1321399263-13826-3-git-send-email-agust@denx.de>
Download mbox | patch
Permalink /patch/125884/
State Accepted
Commit eec3ae68ad92a5af8642846321daad047e4f9cde
Headers show

Comments

Anatolij Gustschin - Nov. 15, 2011, 11:20 p.m.
Fix:
dataflash.c: In function 'AT91F_DataflashInit':
dataflash.c:42:6: warning: variable 'last_part' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/mtd/dataflash.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
Wolfgang Denk - Nov. 16, 2011, 8:28 p.m.
Dear Anatolij Gustschin,

In message <1321399263-13826-3-git-send-email-agust@denx.de> you wrote:
> Fix:
> dataflash.c: In function 'AT91F_DataflashInit':
> dataflash.c:42:6: warning: variable 'last_part' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  drivers/mtd/dataflash.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c
index 96cd395..981ccd5 100644
--- a/drivers/mtd/dataflash.c
+++ b/drivers/mtd/dataflash.c
@@ -39,7 +39,6 @@  int AT91F_DataflashInit (void)
 	int i, j;
 	int dfcode;
 	int part;
-	int last_part;
 	int found[CONFIG_SYS_MAX_DATAFLASH_BANKS];
 	unsigned char protected;
 
@@ -136,7 +135,6 @@  int AT91F_DataflashInit (void)
 				dataflash_info[i].Device.pages_size) - 1;
 
 		part = 0;
-		last_part = 0;
 		/* set the area addresses */
 		for(j = 0; j < NB_DATAFLASH_AREA; j++) {
 			if(found[i]!=0) {
@@ -147,7 +145,6 @@  int AT91F_DataflashInit (void)
 					dataflash_info[i].Device.area_list[j].end =
 						dataflash_info[i].end_address +
 						dataflash_info[i].logical_address;
-					last_part = 1;
 				} else {
 					dataflash_info[i].Device.area_list[j].end =
 						area_list[part].end +