On Wed 1 Aug 2007 06:38, Richard Knutsson pondered:
> 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.
I guess I was asking - _if_ this is really important - lets pick a
preferred way, and try to use
On Wed, Aug 01, 2007 at 12:38:39PM +0200, Richard Knutsson wrote:
> Mike Frysinger wrote:
> >On 7/31/07, Richard Knutsson <[EMAIL PROTECTED]> wrote:
> >
> >>Mike Frysinger wrote:
> >>
> >>>On 7/27/07, Robin Getz <[EMAIL PROTECTED]> wrote:
> >>>
> If there is a definite style or sema
Mike Frysinger wrote:
On 7/31/07, Richard Knutsson <[EMAIL PROTECTED]> wrote:
Mike Frysinger wrote:
On 7/27/07, Robin Getz <[EMAIL PROTECTED]> wrote:
If there is a definite style or semantic preference that everyone should live
with - does it make sense to put checks in checkpat
On 7/31/07, Richard Knutsson <[EMAIL PROTECTED]> wrote:
> Mike Frysinger wrote:
> > On 7/27/07, Robin Getz <[EMAIL PROTECTED]> wrote:
> >> 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?
Mike Frysinger wrote:
On 7/27/07, Robin Getz <[EMAIL PROTECTED]> wrote:
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?
checkpatch.pl does not have enough semantic knowledge to know if
On 7/27/07, Robin Getz <[EMAIL PROTECTED]> wrote:
> 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?
checkpatch.pl does not have enough semantic knowledge to know if the
thing being tested is a p
On Fri 27 Jul 2007 06:18, Yoann Padioleau pondered:
> David Howells <[EMAIL PROTECTED]> writes:
>
> > Yoann Padioleau <[EMAIL PROTECTED]> 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
On Fri, Jul 27, 2007 at 12:21:53PM +0200, Yoann Padioleau wrote:
> > On Fri, Jul 27, 2007 at 11:44:35AM +0200, Yoann Padioleau wrote:
> >>pte = pte_alloc_kernel(pme, va);
> >> - if (pte != 0) {
> >> + if (pte != NULL) {
> I don't understand. pte is a pointer right ? So why should we
> keep
Al Viro <[EMAIL PROTECTED]> writes:
> On Fri, Jul 27, 2007 at 11:44:35AM +0200, Yoann Padioleau wrote:
>> pte = pte_alloc_kernel(pme, va);
>> -if (pte != 0) {
>> +if (pte != NULL) {
>> err = 0;
>> set_pte(pte, mk_pte_phys(pa & PAGE_MASK, prot));
>> }
>>
David Howells <[EMAIL PROTECTED]> writes:
> Yoann Padioleau <[EMAIL PROTECTED]> 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 s
Yoann Padioleau <[EMAIL PROTECTED]> wrote:
> When comparing a pointer, it's clearer to compare it to NULL than to 0.
Can you make them of style:
if (!x)
instead?
Thanks,
David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL P
On Fri, Jul 27, 2007 at 11:44:35AM +0200, Yoann Padioleau wrote:
> pte = pte_alloc_kernel(pme, va);
> - if (pte != 0) {
> + if (pte != NULL) {
> err = 0;
> set_pte(pte, mk_pte_phys(pa & PAGE_MASK, prot));
> }
> @@ -99,7 +99,7 @@ void *consistent_alloc
When comparing a pointer, it's clearer to compare it to NULL than to 0.
Here is an excerpt of the semantic patch:
@@
expression *E;
@@
E ==
- 0
+ NULL
@@
expression *E;
@@
E !=
- 0
+ NULL
Signed-off-by: Yoann Padioleau <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
---
13 matches
Mail list logo