lkml.org 
[lkml]   [2007]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 06/68] 0 -> NULL, for arch/frv
Date
Al Viro <viro@ftp.linux.org.uk> 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));
>> }
>> @@ -99,7 +99,7 @@ void *consistent_alloc(gfp_t gfp, size_t
>>
>> /* allocate some common virtual space to map the new pages */
>> area = get_vm_area(size, VM_ALLOC);
>> - if (area == 0) {
>> + if (area == NULL) {
>> free_pages(page, order);
>> return NULL;
>
> Same comment about comparisons with NULL after allocation...

I don't understand. pte is a pointer right ? So why should we
keep the == 0 ?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-27 12:25    [W:0.269 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site