public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2.6.7-rc3] Remove warnings when unwind debug is turned on
@ 2004-06-11 14:19 Keith Owens
  0 siblings, 0 replies; only message in thread
From: Keith Owens @ 2004-06-11 14:19 UTC (permalink / raw)
  To: linux-ia64

Turning on UNW_DEBUG generates warnings for incorrect number of
parameters for formats and several cases of "suggest explicit braces to
avoid ambiguous `else'", because UNW_DPRINT contains an if statement.

Signed-off-by: Keith Owens <kaos@sgi.com>

Index: linux/arch/ia64/kernel/unwind.c
=================================--- linux.orig/arch/ia64/kernel/unwind.c	Sat Jun 12 00:08:24 2004
+++ linux/arch/ia64/kernel/unwind.c	Sat Jun 12 00:13:56 2004
@@ -395,9 +395,10 @@ unw_access_gr (struct unw_frame_info *in
 	}
 
 	if (write) {
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else {
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else {
 			*addr = *val;
 			if (*nat)
 				*nat_addr |= nat_mask;
@@ -442,9 +443,10 @@ unw_access_br (struct unw_frame_info *in
 		return -1;
 	}
 	if (write)
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else
 			*addr = *val;
 	else
 		*val = *addr;
@@ -490,9 +492,10 @@ unw_access_fr (struct unw_frame_info *in
 	}
 
 	if (write)
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else
 			*addr = *val;
 	else
 		*val = *addr;
@@ -586,9 +589,10 @@ unw_access_ar (struct unw_frame_info *in
 	}
 
 	if (write) {
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else
 			*addr = *val;
 	} else
 		*val = *addr;
@@ -606,9 +610,10 @@ unw_access_pr (struct unw_frame_info *in
 		addr = &info->sw->pr;
 
 	if (write) {
-		if (read_only(addr))
-			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n");
-		else
+		if (read_only(addr)) {
+			UNW_DPRINT(0, "unwind.%s: ignoring attempt to write read-only location\n",
+				__FUNCTION__);
+		} else
 			*addr = *val;
 	} else
 		*val = *addr;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-11 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-11 14:19 [patch 2.6.7-rc3] Remove warnings when unwind debug is turned on Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox