* [PATCH] ARM: fix warning on uninitialized offset.un
@ 2012-09-12 15:46 Cyril Chemparathy
0 siblings, 0 replies; only message in thread
From: Cyril Chemparathy @ 2012-09-12 15:46 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel
Cc: Russell King, H Hartley Sweeten, Stephen Warren, David Howells,
Nicolas Pitre, Cyril Chemparathy
This patch fixes the following warning:
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:327:15: warning: 'offset.un' may be used uninitialized in this function [-Wmaybe-uninitialized]
arch/arm/mm/alignment.c:749:21: note: 'offset.un' was declared here
The fix is to promote the initialization of offset into do_alignment().
Signed-off-by: Cyril Chemparathy <cyril@ti.com>
---
arch/arm/mm/alignment.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 9107231..d15877c 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -699,7 +699,6 @@ do_alignment_t32_to_handler(unsigned long *pinstr, struct pt_regs *regs,
unsigned long instr = *pinstr;
u16 tinst1 = (instr >> 16) & 0xffff;
u16 tinst2 = instr & 0xffff;
- poffset->un = 0;
switch (tinst1 & 0xffe0) {
/* A6.3.5 Load/Store multiple */
@@ -795,6 +794,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
fixup:
regs->ARM_pc += isize;
+ offset.un = 0;
switch (CODING_BITS(instr)) {
case 0x00000000: /* 3.13.4 load/store instruction extensions */
--
1.7.9.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-09-12 15:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-12 15:46 [PATCH] ARM: fix warning on uninitialized offset.un Cyril Chemparathy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®