Thread (57 messages) 57 messages, 7 authors, 2012-03-21

Re: [PATCH] Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]

From: Guan Xuetao <hidden>
Date: 2012-03-21 01:33:03
Also in: lkml

On 03/20/2012 05:33 PM, David Howells wrote:
Guan Xuetao[off-list ref]  wrote:
quoted
Disintegrate asm/system.h for Unicore32. (Compilation successful)
The implementation details are not changed, but only splitted.
BTW, some codestyles are adjusted.

Signed-off-by: David Howells<dhowells@redhat.com>
Signed-off-by: Guan Xuetao<redacted>
Aha!  Much better.  It mostly looks reasonable, apart from one thing.  See the
attached patch, which I'll roll in if you're happy with it.
That's great. It's just what I want  to do.
-extern void panic(const char *fmt, ...);
+/*
+ * Generate a link failure on undefined symbol if the pointer points to a value
+ * of unsupported size.
+ */
+extern void __xchg_bad_pointer(void)
A semicolon should be added at the end.
quoted hunk ↗ jump to hunk
  static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
  		int size)
@@ -31,8 +35,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
  			: "memory", "cc");
  		break;
  	default:
-		panic("xchg: bad data size: ptr 0x%p, size %d\n",
-			ptr, size);
+		__xchg_bad_pointer();
+		break;
I think  the 'break' sentence is redundant.

Thanks and Regards,
Guan Xuetao
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help