Re: [PATCH] NMI trigger switch support for debugging

From: Paul Jackson
Date: Wed May 26 2004 - 15:38:23 EST


Mikael Pettersson, replying to AKIYAMA Nobuyuki:
> > + if (!old_state == !unknown_nmi_panic)
> > + return 0;
>
> This conditional looks terribly obscure.

Would the following variant seem clearer:

if (!!unknown_nmi_panic == !!old_state)
return 0;

Odd, I know. For those of us familiar with the '!!' idiom, which
converts any value to its binary logical equivalent 0 (if zero) or
1 (otherwise), this reads as:

if (the logical value of unknown_nmi_panic is unchanged)
return 0;

However, I could easily imagine others finding this variant even
more bizarre.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/