Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757242Ab2B1Nig (ORCPT ); Tue, 28 Feb 2012 08:38:36 -0500 Received: from arkanian.console-pimps.org ([212.110.184.194]:56888 "EHLO arkanian.console-pimps.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757214Ab2B1Nhb (ORCPT ); Tue, 28 Feb 2012 08:37:31 -0500 From: Matt Fleming To: "H. Peter Anvin" , Andrew Morton Cc: linux-kernel@vger.kernel.org, Matt Fleming Subject: [RFC][PATCH 2/6] x86, relocs: Don't open code put_unaligned_le32() Date: Tue, 28 Feb 2012 13:37:21 +0000 Message-Id: <1330436245-24875-3-git-send-email-matt@console-pimps.org> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1330436245-24875-1-git-send-email-matt@console-pimps.org> References: <1330436245-24875-1-git-send-email-matt@console-pimps.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1342 Lines: 43 From: Matt Fleming Use the new headers in tools/include instead of rolling our own put_unaligned_le32() implementation. Cc: H. Peter Anvin Signed-off-by: Matt Fleming --- arch/x86/boot/compressed/relocs.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c index 89bbf4e..d3c0b02 100644 --- a/arch/x86/boot/compressed/relocs.c +++ b/arch/x86/boot/compressed/relocs.c @@ -10,6 +10,7 @@ #define USE_BSD #include #include +#include static void die(char *fmt, ...); @@ -605,10 +606,7 @@ static void emit_relocs(int as_text) fwrite("\0\0\0\0", 4, 1, stdout); /* Now print each relocation */ for (i = 0; i < reloc_count; i++) { - buf[0] = (relocs[i] >> 0) & 0xff; - buf[1] = (relocs[i] >> 8) & 0xff; - buf[2] = (relocs[i] >> 16) & 0xff; - buf[3] = (relocs[i] >> 24) & 0xff; + put_unaligned_le32(relocs[i], buf); fwrite(buf, 4, 1, stdout); } } -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/