linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* re: powerpc: Remove bootmem allocator
@ 2014-11-12 10:02 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-11-12 10:02 UTC (permalink / raw)
  To: anton; +Cc: linuxppc-dev

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-12 10:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 10:02 powerpc: Remove bootmem allocator Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).