[PATCH 21/21] MIPS: reloc: use IS_ALIGNED macro to check for an alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Improves the code readability a tiny little bit.

Signed-off-by: Denis Orlov <denorl2009@xxxxxxxxx>
---
 arch/mips/lib/reloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index 83b4040d95..a9078aa813 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -133,7 +133,7 @@ void __noreturn relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
 	 * space in the Barebox binary & complexity in handling them.
 	 */
 	off = relocaddr - (unsigned long)__image_start;
-	if (off & 0xffff)
+	if (!IS_ALIGNED(off, SZ_64K))
 		panic("Mis-aligned relocation\n");
 
 	/* Copy Barebox to RAM */
-- 
2.41.0





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux