Skip to contentSkip to conversation

kgdb: use put_unaligned_be32 helper

PATCH New Harvey Harrison 1 participant 1 message May 2, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kgdb: use put_unaligned_be32 helper

---
 kernel/kgdb.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
kernel/kgdb.c +2 -4
index 216c3dc..04e1ff4 100644
@@ -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)
Signature · 1 line
1.5.5.1.350.gbbbf