]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: sctp: fix incorrect type in gfp initializer
authorDaniel Borkmann <dborkman@redhat.com>
Wed, 11 Jun 2014 16:19:32 +0000 (18:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jun 2014 19:23:17 +0000 (12:23 -0700)
This fixes the following sparse warning:

  net/sctp/associola.c:1556:29: warning: incorrect type in initializer (different base types)
  net/sctp/associola.c:1556:29:    expected bool [unsigned] [usertype] preload
  net/sctp/associola.c:1556:29:    got restricted gfp_t

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/associola.c

index 58bbb731fd260970cc894bf0371f71ada1783655..9e0509ce2f841bf9f4eaf38907ef9676192bb2bb 100644 (file)
@@ -1591,7 +1591,7 @@ int sctp_assoc_lookup_laddr(struct sctp_association *asoc,
 /* Set an association id for a given association */
 int sctp_assoc_set_id(struct sctp_association *asoc, gfp_t gfp)
 {
-       bool preload = gfp & __GFP_WAIT;
+       bool preload = !!(gfp & __GFP_WAIT);
        int ret;
 
        /* If the id is already assigned, keep it. */