Re: [PATCH 06/68] 0 -> NULL, for arch/frv



On Fri 27 Jul 2007 06:18, Yoann Padioleau pondered:
David Howells <dhowells@xxxxxxxxxx> writes:

Yoann Padioleau <padator@xxxxxxxxxx> wrote:

When comparing a pointer, it's clearer to compare it to NULL than to
0.

Can you make them of style:

if (!x)

Yes I can. I can make another semantic patch later to do that
transformation. But some people may prefer (x == NULL) to (!x)
so I don't know. I think that transformation
some 0 to NULL is less controversial.



instead?

If there is a definite style or semantic preference that everyone should live
with - does it make sense to put checks in checkpatch.pl to enforce it?

-Robin
-
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/



Relevant Pages

  • Re: [PATCH 1/3] drivers/gpu/drm: Move a dereference below a NULL test
    ... If the NULL test is necessary, then the dereference should be moved below ... The semantic patch that makes this change is as follows: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH 5/7] drivers/net/ixgb/ixgb_main.c: remove unused variable
    ... Julia Lawall wrote: ... The semantic patch that makes this change is as follows: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH 4/4] sound/pci: Drop unnecessary continue
    ... Continue is not needed at the bottom of a loop. ... The semantic patch implementing this change is as follows: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • [PATCH 3/7] [video] ARRAY_SIZE changes
    ... These changes were a direct result of using a semantic patch ... .init = sd_init, ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH 04/68] 0 -> NULL, for arch/blackfin
    ... Here is an excerpt of the semantic patch: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)