On Thu, 08 Mar 2012 01:04:21 +0100, Joe Perches <joe@xxxxxxxxxxx> wrote:
On Wed, 2012-03-07 at 18:39 -0500, Dave Jones wrote:
+static void decode_gfp_mask(gfp_t gfp_mask, char *out_string)
+{
+ unsigned int i;
+
+ for (i = 0; i < 32; i++) {
< sizeof(gfp_t * 8)
+ if (gfp_mask & (1 << i)) {
(gfp_t)1 << i
+ if (gfp_flag_texts[i])
+ out_string += sprintf(out_string, "%s ", gfp_flag_texts[i]);
+ else
+ out_string += sprintf(out_string, "reserved! ");
not much use to exclamation points.
+ }
+ }
+ out_string = "\0";
out_string[-1] = 0;
Will break if gfp_mask == 0.
+}
+
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +----<email/xmpp: mpn@xxxxxxxxxx>--------------ooO--(_)--Ooo--
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href