Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a419818 authored by Stefan Richter's avatar Stefan Richter
Browse files

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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 4e6b9319
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -486,7 +486,7 @@ static int ioctl_get_info(struct client *client, union ioctl_arg *arg)
static int add_client_resource(struct client *client,
static int add_client_resource(struct client *client,
			       struct client_resource *resource, gfp_t gfp_mask)
			       struct client_resource *resource, gfp_t gfp_mask)
{
{
	bool preload = gfp_mask & __GFP_WAIT;
	bool preload = !!(gfp_mask & __GFP_WAIT);
	unsigned long flags;
	unsigned long flags;
	int ret;
	int ret;