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

Message ID 4DF46971.6080200@uw.no
State RFC
Delegated to: David Miller
Headers show

Commit Message

Daniel K. June 12, 2011, 7:23 a.m.
Jesper Juhl wrote:
> On Thu, 9 Jun 2011, David Miller wrote:
>> From: Al Viro <viro@ZenIV.linux.org.uk>
>> 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@uw.no>
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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;