From: Rasmus Villemoes Date: Wed, 6 Aug 2014 23:10:05 +0000 (-0700) Subject: lib: bitmap: make nbits parameter of bitmap_weight unsigned X-Git-Tag: omap-for-v3.17/fixes-against-rc2~137^2~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=877d9f3b63ac2e5dbc51cbcdff156433f03b3a32;p=pandora-kernel.git lib: bitmap: make nbits parameter of bitmap_weight unsigned The compiler can generate slightly smaller and simpler code when it knows that "nbits" is non-negative. Since no-one passes a negative bit-count, this shouldn't affect the semantics. I didn't change the return type, since that might change the semantics of some expression containing a call to bitmap_weight(). Certainly an int is capable of holding the result. Signed-off-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed