From: Dan Carpenter <dan.carpenter@oracle.com>
To: anton@samba.org
Cc: linuxppc-dev@lists.ozlabs.org
Subject: re: powerpc: Remove bootmem allocator
Date: Wed, 12 Nov 2014 13:02:03 +0300 [thread overview]
Message-ID: <20141112100203.GA14571@mwanda> (raw)
Hello Anton Blanchard,
The patch 10239733ee86: "powerpc: Remove bootmem allocator" from Sep
17, 2014, leads to the following static checker warning:
arch/powerpc/mm/pgtable_32.c:108 pte_alloc_one_kernel()
warn: 'pte' can't be NULL.
arch/powerpc/mm/pgtable_32.c
99 __init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
100 {
101 pte_t *pte;
102 extern int mem_init_done;
103
104 if (mem_init_done) {
105 pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
106 } else {
107 pte = __va(memblock_alloc(PAGE_SIZE, PAGE_SIZE));
108 if (pte)
It's complaining because we need to check the return from
memblock_alloc() instead of the return from __va().
109 clear_page(pte);
110 }
111 return pte;
112 }
regards,
dan carpenter
reply other threads:[~2014-11-12 10:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141112100203.GA14571@mwanda \
--to=dan.carpenter@oracle.com \
--cc=anton@samba.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.