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

Tabi Timur-B04825 B04825 at freescale.com
Thu Aug 23 01:07:00 EST 2012


On Wed, Aug 22, 2012 at 5:43 AM, Tiejun Chen <tiejun.chen at 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 !!.

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the Linuxppc-dev mailing list