On 7/31/07, Richard Knutsson <ricknu-0@xxxxxxxxxxxxxx> wrote:If I understood Robin correctly, he suggested that checkpatch.pl would tell to convert "x == NULL" to "!x", if that would be the preferred way.
Mike Frysinger wrote:
On 7/27/07, Robin Getz <rgetz@xxxxxxxxxxxxxxxxxxxx> wrote:Didn't he mean "x == NULL" > "!x"?
If there is a definite style or semantic preference that everyone should livecheckpatch.pl does not have enough semantic knowledge to know if the
with - does it make sense to put checks in checkpatch.pl to enforce it?
thing being tested is a pointer ... dont know if the sparse utility
would be able to pick it out as i'm not familiar with what level that
thing runs at
i'm sure i understand your meaning of ">" ... are you saying that "x
== NULL" is greater (preferred) to "!x" or are you saying that "x ==
NULL" should be changed to "!x" ?
i dont think the former case can be checked by checkpatch.pl, but theI agree!
latter certainly can ... but i'd be very skeptical you could get the
wider LKML audience to sign off one way or the other wrt to "x ==
NULL" vs "!x". you can certainly get people to sign off on "x == 0"
being wrong when x is a pointer.