From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning
Date: Thu, 1 Dec 2011 23:11:39 +0100 [thread overview]
Message-ID: <201112012311.39224.marek.vasut@gmail.com> (raw)
In-Reply-To: <1322641077-829-8-git-send-email-wd@denx.de>
> Fix:
> ../common/flash.c: In function 'flash_erase':
> ../common/flash.c:307:24: warning: variable 'l_sect' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Travis Sawyer <travis.sawyer@sandburst.com>
> ---
> total: 0 errors, 0 warnings, 23 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
> MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> board/sandburst/common/flash.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/board/sandburst/common/flash.c
> b/board/sandburst/common/flash.c index c65cb96..818a7c3 100644
> --- a/board/sandburst/common/flash.c
> +++ b/board/sandburst/common/flash.c
> @@ -304,7 +304,7 @@ int flash_erase (flash_info_t *info, int s_first, int
> s_last) {
> volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info->start[0]);
> volatile FLASH_WORD_SIZE *addr2;
> - int flag, prot, sect, l_sect;
> + int flag, prot, sect;
> int i;
>
> if ((s_first < 0) || (s_first > s_last)) {
> @@ -335,8 +335,6 @@ int flash_erase (flash_info_t *info, int s_first, int
> s_last) printf ("\n");
> }
>
> - l_sect = -1;
> -
> /* Disable interrupts which might cause a timeout here */
> flag = disable_interrupts();
>
> @@ -363,7 +361,6 @@ int flash_erase (flash_info_t *info, int s_first, int
> s_last) addr[ADDR1] = (FLASH_WORD_SIZE)0x00550055;
> addr2[0] = (FLASH_WORD_SIZE)0x00300030; /*
sector erase */
> }
> - l_sect = sect;
> /*
> * Wait for each sector to complete, it's more
> * reliable. According to AMD Spec, you must
Logically looks OK
Acked-by: Marek Vasut <marek.vasut@gmail.com>
next prev parent reply other threads:[~2011-12-01 22:11 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 8:17 [U-Boot] [PATCH 00/14] More fixes GCC 4.6 build warnings Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 01/14] alpr board: Fix " Wolfgang Denk
2011-12-01 8:55 ` Stefan Roese
2011-12-01 23:09 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 02/14] board/amirix/ap1000/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
2011-12-01 22:10 ` Marek Vasut
2011-12-01 23:10 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 03/14] drivers/block/sata_dwc.c: " Wolfgang Denk
2011-12-01 23:10 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 04/14] board/cray/L1/flash.c: " Wolfgang Denk
2011-12-01 22:10 ` Marek Vasut
2011-12-01 23:11 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 05/14] DB64360: Fix GCC 4.6 build warnings Wolfgang Denk
2011-12-01 23:11 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 06/14] DB64460: " Wolfgang Denk
2011-12-01 23:11 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 07/14] board/sandburst/common/flash.c: Fix GCC 4.6 build warning Wolfgang Denk
2011-12-01 22:11 ` Marek Vasut [this message]
2011-12-01 23:12 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 08/14] drivers/usb/host/sl811-hcd.c: " Wolfgang Denk
2011-12-01 22:13 ` Marek Vasut
2011-12-01 23:13 ` Wolfgang Denk
2011-12-01 23:14 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 09/14] post/board/lwmon5/gdc.c: " Wolfgang Denk
2011-12-01 8:55 ` Stefan Roese
2011-12-01 23:14 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 10/14] board/mpl/common/flash.c: " Wolfgang Denk
2011-12-01 22:14 ` Marek Vasut
2011-12-01 23:15 ` Wolfgang Denk
2011-12-01 23:16 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 11/14] board/freescale/mpc8610hpcd/mpc8610hpcd.c: " Wolfgang Denk
2011-11-30 13:55 ` Kumar Gala
2011-12-01 23:16 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 12/14] arch/powerpc/cpu/mpc86xx/cpu.c: " Wolfgang Denk
2011-11-30 13:55 ` Kumar Gala
2011-12-01 23:16 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 13/14] board/sbc405/strataflash.c: " Wolfgang Denk
2011-12-01 22:14 ` Marek Vasut
2011-12-01 23:17 ` Wolfgang Denk
2011-11-30 8:17 ` [U-Boot] [PATCH 14/14] board/emk/top860/top860.c: " Wolfgang Denk
2011-12-01 23:17 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201112012311.39224.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox