Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firewire: core: typecast from gfp_t to bool more safely

An idr related patch introduced the following sparse warning:
drivers/firewire/core-cdev.c:488:33: warning: incorrect type in initializer (different base types)
drivers/firewire/core-cdev.c:488:33: expected bool [unsigned] [usertype] preload
drivers/firewire/core-cdev.c:488:33: got restricted gfp_t
So let's convert from gfp_t bitfield to Boolean explicitly and safely.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

+1 -1
+1 -1
drivers/firewire/core-cdev.c
··· 486 486 static int add_client_resource(struct client *client, 487 487 struct client_resource *resource, gfp_t gfp_mask) 488 488 { 489 - bool preload = gfp_mask & __GFP_WAIT; 489 + bool preload = !!(gfp_mask & __GFP_WAIT); 490 490 unsigned long flags; 491 491 int ret; 492 492