ARM: Fix build warning in arch/arm/mm/alignment.c
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 10 Sep 2012 10:50:45 +0000 (11:50 +0100)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 20 Feb 2015 20:11:08 +0000 (22:11 +0200)
commita637925762f544a77accf4af89f71223a7b46dd9
treea7a2a1bc4fa0b955124e7d594a28c9115e5b51b5
parent9e06a51e4e83741f5b2568f6576bd8a89468f485
ARM: Fix build warning in arch/arm/mm/alignment.c

Fix this harmless build warning:

arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:749:21: warning: 'offset.un' may be used uninitialized in this function

This is caused by the compiler not being able to properly analyse the
code to prove that offset.un is assigned in every case.  The case it
struggles with is where we assign the handler from the Thumb parser -
do_alignment_t32_to_handler().  As this starts by zeroing this variable
via a pointer, move it into the calling function.  This fixes the
warning.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/alignment.c