Subject: Re: [PATCH 2/3] powerpc: Bail out of KGDB when we've been triggered

From: "tiejun.chen" <[email-masked]>
Date: Thu, 23 Aug 2012 09:54:54 +0800

On 08/22/2012 11:07 PM, Tabi Timur-B04825 wrote:
> On Wed, Aug 22, 2012 at 5:43 AM, Tiejun Chen <[email-masked]> 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