linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [Q] mm/memblock.c: cast truncates bits from RED_INACTIVE
@ 2011-06-15  0:47 H Hartley Sweeten
  2011-06-21  0:02 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: H Hartley Sweeten @ 2011-06-15  0:47 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org
  Cc: linux-mm@kvack.org, benh@kernel.crashing.org, yinghai@kernel.org,
	hpa@linux.intel.com, Andrew Morton

Hello all,

Sparse is reporting a couple warnings in mm/memblock.c:

	warning: cast truncates bits from constant value (9f911029d74e35b becomes 9d74e35b)

The warnings are due to the cast of RED_INACTIVE in memblock_analyze():

	/* Check marker in the unused last array entry */
	WARN_ON(memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS].base
		!= (phys_addr_t)RED_INACTIVE);
	WARN_ON(memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS].base
		!= (phys_addr_t)RED_INACTIVE);

And in memblock_init():

	/* Write a marker in the unused last array entry */
	memblock.memory.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE;
	memblock.reserved.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE;

Could this cause any problems?  If not, is there anyway to quiet the sparse noise?

Regards,
Hartley

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-21  5:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15  0:47 [Q] mm/memblock.c: cast truncates bits from RED_INACTIVE H Hartley Sweeten
2011-06-21  0:02 ` Andrew Morton
2011-06-21  0:31   ` H Hartley Sweeten
2011-06-21  5:49     ` Pekka Enberg

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).