staging: lustre: fix gfp_t/int coercion
authorOmar Sandoval <osandov@osandov.com>
Fri, 26 Sep 2014 07:30:49 +0000 (00:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Sep 2014 02:04:58 +0000 (22:04 -0400)
Fix a few implicit casts between int and gfp_t which were caught by sparse.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/lloop.c
drivers/staging/lustre/lustre/ptlrpc/client.c
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h

index d504a44d5b62401f2b9cd527a037370b7375f911..264e5ec3fed6581bf88b65d8071f7495cfb7c21b 100644 (file)
@@ -126,7 +126,7 @@ struct lloop_device {
        struct block_device *lo_device;
        unsigned             lo_blocksize;
 
-       int               old_gfp_mask;
+       gfp_t             old_gfp_mask;
 
        spinlock_t              lo_lock;
        struct bio              *lo_bio;
@@ -548,7 +548,7 @@ static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev,
                       int count)
 {
        struct file *filp = lo->lo_backing_file;
-       int gfp = lo->old_gfp_mask;
+       gfp_t gfp = lo->old_gfp_mask;
 
        if (lo->lo_state != LLOOP_BOUND)
                return -ENXIO;
index 112e30b3d34542938d10af41fcf2ab0543fde021..38cc931a189c32cdf04afc584a86cd314208509b 100644 (file)
@@ -394,7 +394,7 @@ void ptlrpc_request_cache_fini(void)
        kmem_cache_destroy(request_cache);
 }
 
-struct ptlrpc_request *ptlrpc_request_cache_alloc(int flags)
+struct ptlrpc_request *ptlrpc_request_cache_alloc(gfp_t flags)
 {
        struct ptlrpc_request *req;
 
index f7be007c88cbb58a0ece501d4b8e1b5dd8382e2f..7fe2e584ffd7d6c27667215c17be182a251da303 100644 (file)
@@ -57,7 +57,7 @@ struct ptlrpc_bulk_desc *ptlrpc_new_bulk(unsigned npages, unsigned max_brw,
                                         unsigned type, unsigned portal);
 int ptlrpc_request_cache_init(void);
 void ptlrpc_request_cache_fini(void);
-struct ptlrpc_request *ptlrpc_request_cache_alloc(int flags);
+struct ptlrpc_request *ptlrpc_request_cache_alloc(gfp_t flags);
 void ptlrpc_request_cache_free(struct ptlrpc_request *req);
 void ptlrpc_init_xid(void);