lkml.org 
[lkml]   [2012]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] ARM: Fix build warning in do_alignment.
From
> What it's caused by is do_alignment_t32_to_handler(), and its assignment
> through a pointer of this variable. You can see that this is the cause
> because the patch below fixes the warning.
We couldn't fix the warning with your patch. the patch below fixes it instead.
IMHO, gcc can't seems to know that do_alignment_ldmstm never returns TYPE_LDST.
So It just warn that do_alignment_finish_ldst is called with the
uninitialized value.
I know gcc is not smart enough to see all the reasons. So, It is optional.
Also, I'm not sure these optional warning should be fixed.
Anyway, this is the last build warning in our whole source when using gcc-4.6.3

Thanks
Chanho,

diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 9107231..978db1f 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -856,8 +856,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 {
+ offset.un = 0;
handler = do_alignment_ldmstm;
+ }
break;

default:

\
 
 \ /
  Last update: 2012-09-11 04:41    [W:0.054 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site