public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel K." <dk@uw.no>
To: Jesper Juhl <jj@chaosbits.net>
Cc: David Miller <davem@davemloft.net>,
	viro@ZenIV.linux.org.uk, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] Sparc: Remove trigraph in die_if_kernel() message.
Date: Sun, 12 Jun 2011 07:23:29 +0000	[thread overview]
Message-ID: <4DF46971.6080200@uw.no> (raw)
In-Reply-To: <alpine.LNX.2.00.1106100947010.19998@swampdragon.chaosbits.net>

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>
---
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;

      reply	other threads:[~2011-06-12  7:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 14:38 [PATCH][RFC] Sparc: Remove trigraph in die_if_kernel() message Jesper Juhl
2011-06-09 22:59 ` David Miller
2011-06-09 23:03   ` Al Viro
2011-06-09 23:06     ` David Miller
2011-06-10  7:51       ` Jesper Juhl
2011-06-12  7:23         ` Daniel K. [this message]

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=4DF46971.6080200@uw.no \
    --to=dk@uw.no \
    --cc=davem@davemloft.net \
    --cc=jj@chaosbits.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox