Re: [PATCH][RFC] Sparc: Remove trigraph in die_if_kernel() message.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jesper Juhl wrote:
On Thu, 9 Jun 2011, David Miller wrote:

From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Jun 2011 00:03:22 +0100

On Thu, Jun 09, 2011 at 03:59:43PM -0700, David Miller wrote:
If I'm not mistaken, that "??!" will be taken as a trigraph for "|" by the preprocessor, so the final string will end up either as
  "Penguin instruction from Penguin mode|?!"
Not without -trigraphs, which is not on by default...
Oh, in that case I'll rever this.


Well, my gcc warns about it. It seems that -Wtrigraphs is enabled by default:

Perhaps the _real_ fix is just to remove all the interrobanging going on here,
and be in line with all the other die_if_kernel() calls in the file.

Something like this?

(Yeah, I shamelessly snarfed the patch from Jesper, and deleted all the excess
?'s and !'s. I haven't cared enough figure out the proper *-by: attribution
magic to credit Jesper, so someone just add whatever is necessary if they feel
so inclined. I can't pretend to care much about my contribution in this.)

Signed-off-by: Daniel K. <dk@xxxxx>
---
diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c
index c0490c7..d99ca40 100644
--- a/arch/sparc/kernel/traps_32.c
+++ b/arch/sparc/kernel/traps_32.c
@@ -137,7 +137,7 @@ void do_priv_instruction(struct pt_regs *regs, unsigned long pc, unsigned long n
	siginfo_t info;

	if(psr & PSR_PS)
-		die_if_kernel("Penguin instruction from Penguin mode??!?!", regs);
+		die_if_kernel("Penguin instruction from Penguin mode", regs);
	info.si_signo = SIGILL;
	info.si_errno = 0;
	info.si_code = ILL_PRVOPC;
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux