All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 9/9] ARM: xm250: Fix GCC 4.6 warnings
Date: Sat, 19 Nov 2011 10:05:34 -0800	[thread overview]
Message-ID: <CAPnjgZ1VHKRKgv+B_4hF=qZj=dFs+2FTG-7jhzVnmn1op0Ts2w@mail.gmail.com> (raw)
In-Reply-To: <1321703956-4224-10-git-send-email-agust@denx.de>

On Sat, Nov 19, 2011 at 3:59 AM, Anatolij Gustschin <agust@denx.de> wrote:
> Fix:
> flash.c: In function 'flash_erase':
> flash.c:252:6: warning: variable 'flag' set but not used
> [-Wunused-but-set-variable]
> flash.c: In function 'write_data':
> flash.c:421:6: warning: variable 'flag' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>

I don't actually see this warning with my compiler, but it looks right.

Acked-by: Simon Glass <sjg@chromium.org>

> ---
> ?board/xm250/flash.c | ? ?7 +++----
> ?1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/board/xm250/flash.c b/board/xm250/flash.c
> index e825aba..b953502 100644
> --- a/board/xm250/flash.c
> +++ b/board/xm250/flash.c
> @@ -249,7 +249,7 @@ static ulong flash_get_size (FPW *addr, flash_info_t *info)
>
> ?int flash_erase (flash_info_t *info, int s_first, int s_last)
> ?{
> - ? ? ? int flag, prot, sect;
> + ? ? ? int prot, sect;
> ? ? ? ?ulong type, start;
> ? ? ? ?int rcode = 0;
>
> @@ -284,7 +284,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
> ? ? ? ?}
>
> ? ? ? ?/* Disable interrupts which might cause a timeout here */
> - ? ? ? flag = disable_interrupts ();
> + ? ? ? disable_interrupts();
>
> ? ? ? ?/* Start erase on unprotected sectors */
> ? ? ? ?for (sect = s_first; sect <= s_last; sect++) {
> @@ -418,7 +418,6 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
> ?{
> ? ? ? ?FPWV *addr = (FPWV *) dest;
> ? ? ? ?ulong status;
> - ? ? ? int flag;
> ? ? ? ?ulong start;
>
> ? ? ? ?/* Check if Flash is (sufficiently) erased */
> @@ -427,7 +426,7 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
> ? ? ? ? ? ? ? ?return (2);
> ? ? ? ?}
> ? ? ? ?/* Disable interrupts which might cause a timeout here */
> - ? ? ? flag = disable_interrupts ();
> + ? ? ? disable_interrupts();
>
> ? ? ? ?*addr = (FPW) 0x00400040; ? ? ? /* write setup */
> ? ? ? ?*addr = data;
> --
> 1.7.5.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

  reply	other threads:[~2011-11-19 18:05 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-19 11:59 [U-Boot] [PATCH 0/9] Fix build issues for some ARM boards Anatolij Gustschin
2011-11-19 11:59 ` [U-Boot] [PATCH 1/9] ARM: a320evb: re-add MACH_TYPE_FARADAY Anatolij Gustschin
2011-11-19 17:56   ` Simon Glass
2011-11-21 18:46   ` Anatolij Gustschin
2011-11-22  3:18     ` Po-Yu Chuang
2011-11-22  3:45       ` Po-Yu Chuang
2011-11-19 11:59 ` [U-Boot] [PATCH 2/9] ARM: cerf250: re-add MACH_TYPE_PXA_CERF Anatolij Gustschin
2011-11-19 17:56   ` Simon Glass
2011-11-20  0:09     ` Marek Vasut
2011-11-20  0:18       ` Marek Vasut
2011-11-21 16:44         ` Albert ARIBAUD
2011-11-19 11:59 ` [U-Boot] [PATCH 3/9] ARM: cradle: re-add MACH_TYPE_HHP_CRADLE Anatolij Gustschin
2011-11-19 17:57   ` Simon Glass
2011-11-21 22:28   ` Marek Vasut
2011-11-19 11:59 ` [U-Boot] [PATCH 4/9] ARM: pleb2: re-add MACH_TYPE_PLEB2 Anatolij Gustschin
2011-11-19 17:57   ` Simon Glass
2011-11-21 22:29   ` Marek Vasut
2011-11-19 11:59 ` [U-Boot] [PATCH 5/9] ARM: sbc35_a9g20: re-add MACH_TYPE_SBC35_A9G20 Anatolij Gustschin
2011-11-19 17:58   ` Simon Glass
2011-11-21 18:55   ` Anatolij Gustschin
2011-12-19 10:58   ` Albert ARIBAUD
2011-11-19 11:59 ` [U-Boot] [PATCH 6/9] ARM: tny_a9260: re-add MACH_TYPE_TNY_A9G20 and MACH_TYPE_TNY_A9260 Anatolij Gustschin
2011-11-19 18:00   ` Simon Glass
2011-11-21 18:57   ` Anatolij Gustschin
2011-12-19 10:58   ` Albert ARIBAUD
2011-11-19 11:59 ` [U-Boot] [PATCH 7/9] ARM: xm250: re-add MACH_TYPE_XM250 Anatolij Gustschin
2011-11-19 18:01   ` Simon Glass
2011-11-19 11:59 ` [U-Boot] [PATCH 8/9] ARM: cerf250: fix GCC 4.6 warings Anatolij Gustschin
2011-11-19 18:04   ` Simon Glass
2011-11-19 11:59 ` [U-Boot] [PATCH 9/9] ARM: xm250: Fix GCC 4.6 warnings Anatolij Gustschin
2011-11-19 18:05   ` Simon Glass [this message]
2011-11-21 22:39   ` Marek Vasut
2011-11-21 16:45 ` [U-Boot] [PATCH 0/9] Fix build issues for some ARM boards Albert ARIBAUD
2011-11-21 19:24   ` Anatolij Gustschin

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='CAPnjgZ1VHKRKgv+B_4hF=qZj=dFs+2FTG-7jhzVnmn1op0Ts2w@mail.gmail.com' \
    --to=sjg@chromium.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.