* [PATCH] ARM: Fix warning with gcc 4.5.1 in alignment fixup
@ 2010-12-07 20:28 Jamie Iles
2010-12-08 2:55 ` George G. Davis
2011-01-06 15:33 ` Jamie Iles
0 siblings, 2 replies; 3+ messages in thread
From: Jamie Iles @ 2010-12-07 20:28 UTC (permalink / raw)
To: linux-arm-kernel
With GCC 4.5.1 we get the following warning:
CC arch/arm/mm/alignment.o
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:720:21: warning: 'offset.un' may be used
uninitialized in this function
This warning is triggered for the LDM/STM instructions which don't have
a register offset so set the offset to 0 to keep GCC happy.
Cc: George G. Davis <gdavis@mvista.com>
Cc: Min Zhang <mzhang@mvista.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
arch/arm/mm/alignment.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 724ba3b..298aaef 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -824,8 +824,10 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
case 0x08000000: /* ldm or stm, or thumb-2 32bit instruction */
if (thumb2_32b)
handler = do_alignment_t32_to_handler(&instr, regs, &offset);
- else
+ else {
handler = do_alignment_ldmstm;
+ offset.un = 0;
+ }
break;
default:
--
1.7.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: Fix warning with gcc 4.5.1 in alignment fixup
2010-12-07 20:28 [PATCH] ARM: Fix warning with gcc 4.5.1 in alignment fixup Jamie Iles
@ 2010-12-08 2:55 ` George G. Davis
2011-01-06 15:33 ` Jamie Iles
1 sibling, 0 replies; 3+ messages in thread
From: George G. Davis @ 2010-12-08 2:55 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Dec 07, 2010 at 08:28:44PM +0000, Jamie Iles wrote:
> With GCC 4.5.1 we get the following warning:
>
> CC arch/arm/mm/alignment.o
> arch/arm/mm/alignment.c: In function 'do_alignment':
> arch/arm/mm/alignment.c:720:21: warning: 'offset.un' may be used
> uninitialized in this function
>
> This warning is triggered for the LDM/STM instructions which don't have
> a register offset so set the offset to 0 to keep GCC happy.
Your change looks fine to me.
--
Regards,
George
>
> Cc: George G. Davis <gdavis@mvista.com>
> Cc: Min Zhang <mzhang@mvista.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
> arch/arm/mm/alignment.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
> index 724ba3b..298aaef 100644
> --- a/arch/arm/mm/alignment.c
> +++ b/arch/arm/mm/alignment.c
> @@ -824,8 +824,10 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
> case 0x08000000: /* ldm or stm, or thumb-2 32bit instruction */
> if (thumb2_32b)
> handler = do_alignment_t32_to_handler(&instr, regs, &offset);
> - else
> + else {
> handler = do_alignment_ldmstm;
> + offset.un = 0;
> + }
> break;
>
> default:
> --
> 1.7.3.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: Fix warning with gcc 4.5.1 in alignment fixup
2010-12-07 20:28 [PATCH] ARM: Fix warning with gcc 4.5.1 in alignment fixup Jamie Iles
2010-12-08 2:55 ` George G. Davis
@ 2011-01-06 15:33 ` Jamie Iles
1 sibling, 0 replies; 3+ messages in thread
From: Jamie Iles @ 2011-01-06 15:33 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Dec 07, 2010 at 08:28:44PM +0000, Jamie Iles wrote:
> With GCC 4.5.1 we get the following warning:
>
> CC arch/arm/mm/alignment.o
> arch/arm/mm/alignment.c: In function 'do_alignment':
> arch/arm/mm/alignment.c:720:21: warning: 'offset.un' may be used
> uninitialized in this function
>
> This warning is triggered for the LDM/STM instructions which don't have
> a register offset so set the offset to 0 to keep GCC happy.
>
> Cc: George G. Davis <gdavis@mvista.com>
> Cc: Min Zhang <mzhang@mvista.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
Hi Russell,
Ok to send this one to the patch system?
Jamie
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-06 15:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-07 20:28 [PATCH] ARM: Fix warning with gcc 4.5.1 in alignment fixup Jamie Iles
2010-12-08 2:55 ` George G. Davis
2011-01-06 15:33 ` Jamie Iles
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.