* [PATCH] kgdb: use put_unaligned_be32 helper
@ 2008-05-02 2:05 Harvey Harrison
0 siblings, 0 replies; only message in thread
From: Harvey Harrison @ 2008-05-02 2:05 UTC (permalink / raw)
To: Jason Wessel, Ingo Molnar; +Cc: LKML, Andrew Morton
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
kernel/kgdb.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index 216c3dc..04e1ff4 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -52,6 +52,7 @@
#include <asm/byteorder.h>
#include <asm/atomic.h>
#include <asm/system.h>
+#include <asm/unaligned.h>
static int kgdb_break_asap;
@@ -504,10 +505,7 @@ static void int_to_threadref(unsigned char *id, int value)
scan = (unsigned char *)id;
while (i--)
*scan++ = 0;
- *scan++ = (value >> 24) & 0xff;
- *scan++ = (value >> 16) & 0xff;
- *scan++ = (value >> 8) & 0xff;
- *scan++ = (value & 0xff);
+ put_unaligned_be32(value, scan);
}
static struct task_struct *getthread(struct pt_regs *regs, int tid)
--
1.5.5.1.350.gbbbf
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-02 2:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-02 2:05 [PATCH] kgdb: use put_unaligned_be32 helper Harvey Harrison
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox