Skip to content

Commit

Permalink
arm64: guard asm/assembler.h against multiple inclusions
Browse files Browse the repository at this point in the history
asm/assembler.h lacks the usual guard against multiple inclusion,
leading to a compilation failure if it is accidentally included
twice.

Using the classic #ifndef/#define/#endif construct solves the issue.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Marc Zyngier authored and Will Deacon committed Feb 23, 2015
1 parent 115386f commit f3e3927
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/arm64/include/asm/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#error "Only include this from assembly code"
#endif

#ifndef __ASM_ASSEMBLER_H
#define __ASM_ASSEMBLER_H

#include <asm/ptrace.h>
#include <asm/thread_info.h>

Expand Down Expand Up @@ -155,3 +158,5 @@ lr .req x30 // link register
#endif
orr \rd, \lbits, \hbits, lsl #32
.endm

#endif /* __ASM_ASSEMBLER_H */

0 comments on commit f3e3927

Please sign in to comment.