From: Andrew Morton Date: Thu, 10 May 2007 10:15:18 +0000 (-0700) Subject: add upper-32-bits macro X-Git-Tag: v2.6.22-rc1~127 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=218e180e7ea5334e1f94121940ba82cd1f0f4e58;p=pandora-kernel.git add upper-32-bits macro We keep on getting "right shift count >= width of type" warnings when doing things like sector_t s; x = s >> 56; because with CONFIG_LBD=n, s is only 32-bit. Similar problems can occur with dma_addr_t's. So add a simple wrapper function which code can use to avoid this warning. The above example would become x = upper_32_bits(s) >> 24; The first user is in fact AFS. Cc: James Bottomley Cc: "Cameron, Steve" Cc: "Miller, Mike (OS Dev)" Cc: Hisashi Hifumi Cc: Alan Cox Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed