Skip to content

Commit

Permalink
firewire: core: typecast from gfp_t to bool more safely
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Richter committed Jul 30, 2013
1 parent 4e6b931 commit 0a41981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/firewire/core-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ static int ioctl_get_info(struct client *client, union ioctl_arg *arg)
static int add_client_resource(struct client *client,
struct client_resource *resource, gfp_t gfp_mask)
{
bool preload = gfp_mask & __GFP_WAIT;
bool preload = !!(gfp_mask & __GFP_WAIT);
unsigned long flags;
int ret;

Expand Down

0 comments on commit 0a41981

Please sign in to comment.