All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Kondratiev <vladimir.kondratiev@intel.com>
To: linux-kernel@vger.kernel.org
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: __FUNCTION__ - for /arch/mips
Date: Sun, 13 Jan 2002 23:41:04 +0200	[thread overview]
Message-ID: <3C41FEF0.2010402@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 113 bytes --]

Hi,
patch attached fixes __FUNCTION__ concatenation for mips arch. No side 
effects. Patch against 2.4.18-pre3.


[-- Attachment #2: __FUNCTION__.mips.patch --]
[-- Type: text/plain, Size: 2191 bytes --]

diff -ur -X /home/vkondra-l/lib/dontdiff linux-2.4.18-pre3.orig/arch/mips/kernel/traps.c linux-2.4.18-pre3.patched/arch/mips/kernel/traps.c
--- linux-2.4.18-pre3.orig/arch/mips/kernel/traps.c	Sun Sep  9 20:43:01 2001
+++ linux-2.4.18-pre3.patched/arch/mips/kernel/traps.c	Fri Jan 11 23:54:42 2002
@@ -191,13 +191,13 @@
 spinlock_t die_lock;
 
 extern void __die(const char * str, struct pt_regs * regs, const char *where,
-                  unsigned long line)
+                  const char* func, unsigned long line)
 {
 	console_verbose();
 	spin_lock_irq(&die_lock);
 	printk("%s", str);
 	if (where)
-		printk(" in %s, line %ld", where, line);
+		printk(" in %s:%s, line %ld", where, (func ? : "???"), line);
 	printk(":\n");
 	show_regs(regs);
 	printk("Process %s (pid: %d, stackpage=%08lx)\n",
@@ -211,10 +211,10 @@
 }
 
 void __die_if_kernel(const char * str, struct pt_regs * regs, const char *where,
-	unsigned long line)
+	const char* func, unsigned long line)
 {
 	if (!user_mode(regs))
-		__die(str, regs, where, line);
+		__die(str, regs, where, func, line);
 }
 
 extern const struct exception_table_entry __start___dbe_table[];
diff -ur -X /home/vkondra-l/lib/dontdiff linux-2.4.18-pre3.orig/include/asm-mips/system.h linux-2.4.18-pre3.patched/include/asm-mips/system.h
--- linux-2.4.18-pre3.orig/include/asm-mips/system.h	Sun Sep  9 20:43:01 2001
+++ linux-2.4.18-pre3.patched/include/asm-mips/system.h	Sat Jan 12 00:03:07 2002
@@ -252,13 +252,13 @@
 extern void *set_except_vector(int n, void *addr);
 
 extern void __die(const char *, struct pt_regs *, const char *where,
-	unsigned long line) __attribute__((noreturn));
+	const char* func, unsigned long line) __attribute__((noreturn));
 extern void __die_if_kernel(const char *, struct pt_regs *, const char *where,
-	unsigned long line);
+	const char* func, unsigned long line);
 
 #define die(msg, regs)							\
-	__die(msg, regs, __FILE__ ":"__FUNCTION__, __LINE__)
+	__die(msg, regs, __FILE__, __FUNCTION__, __LINE__)
 #define die_if_kernel(msg, regs)					\
-	__die_if_kernel(msg, regs, __FILE__ ":"__FUNCTION__, __LINE__)
+	__die_if_kernel(msg, regs, __FILE__, __FUNCTION__, __LINE__)
 
 #endif /* _ASM_SYSTEM_H */

                 reply	other threads:[~2002-01-13 21:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C41FEF0.2010402@intel.com \
    --to=vladimir.kondratiev@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.