From: "tiejun.chen" <tiejun.chen@windriver.com>
To: Tabi Timur-B04825 <B04825@freescale.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jason.wessel@windriver.com" <jason.wessel@windriver.com>
Subject: Re: [PATCH 2/3] powerpc: Bail out of KGDB when we've been triggered
Date: Thu, 23 Aug 2012 09:54:54 +0800 [thread overview]
Message-ID: <50358D6E.20209@windriver.com> (raw)
In-Reply-To: <6AE080B68D46FC4BA2D2769E68D765B7059AE7E7@039-SN2MPN1-022.039d.mgd.msft.net>
On 08/22/2012 11:07 PM, Tabi Timur-B04825 wrote:
> On Wed, Aug 22, 2012 at 5:43 AM, Tiejun Chen <tiejun.chen@windriver.com> wrote:
>
>> +int kgdb_skipexception(int exception, struct pt_regs *regs)
>> +{
>> + if (kgdb_isremovedbreak(regs->nip))
>> + return 1;
>> +
>> + return 0;
>> +}
>
> int kgdb_skipexception(int exception, struct pt_regs *regs)
> {
> return !!kgdb_isremovedbreak(regs->nip));
> }
>
> If the caller only cares about zero vs. non-zero, you can drop the !!.
Yes, so 'return kgdb_isremovedbreak(regs->nip);' is already fine and simple.
I'll update this as v2 so thanks your comment.
Tiejun
next prev parent reply other threads:[~2012-08-23 2:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 10:43 [PATCH 1/3] kgdb,ppc: do not set kgdb_single_step on ppc Tiejun Chen
2012-08-22 10:43 ` [PATCH 2/3] powerpc: Bail out of KGDB when we've been triggered Tiejun Chen
2012-08-22 15:07 ` Tabi Timur-B04825
2012-08-23 1:54 ` tiejun.chen [this message]
2012-08-22 10:43 ` [PATCH 3/3] powerpc/kgdb: restore current_thread_info properly Tiejun Chen
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=50358D6E.20209@windriver.com \
--to=tiejun.chen@windriver.com \
--cc=B04825@freescale.com \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).