Skip to content

Commit f1c571d

Browse files
osandovgregkh
authored andcommitted
staging: lustre: fix gfp_t/int coercion
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>
1 parent 3d3ab8c commit f1c571d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/staging/lustre/lustre/llite/lloop.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ struct lloop_device {
126126
struct block_device *lo_device;
127127
unsigned lo_blocksize;
128128

129-
int old_gfp_mask;
129+
gfp_t old_gfp_mask;
130130

131131
spinlock_t lo_lock;
132132
struct bio *lo_bio;
@@ -548,7 +548,7 @@ static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev,
548548
int count)
549549
{
550550
struct file *filp = lo->lo_backing_file;
551-
int gfp = lo->old_gfp_mask;
551+
gfp_t gfp = lo->old_gfp_mask;
552552

553553
if (lo->lo_state != LLOOP_BOUND)
554554
return -ENXIO;

‎drivers/staging/lustre/lustre/ptlrpc/client.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ void ptlrpc_request_cache_fini(void)
394394
kmem_cache_destroy(request_cache);
395395
}
396396

397-
struct ptlrpc_request *ptlrpc_request_cache_alloc(int flags)
397+
struct ptlrpc_request *ptlrpc_request_cache_alloc(gfp_t flags)
398398
{
399399
struct ptlrpc_request *req;
400400

‎drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct ptlrpc_bulk_desc *ptlrpc_new_bulk(unsigned npages, unsigned max_brw,
5757
unsigned type, unsigned portal);
5858
int ptlrpc_request_cache_init(void);
5959
void ptlrpc_request_cache_fini(void);
60-
struct ptlrpc_request *ptlrpc_request_cache_alloc(int flags);
60+
struct ptlrpc_request *ptlrpc_request_cache_alloc(gfp_t flags);
6161
void ptlrpc_request_cache_free(struct ptlrpc_request *req);
6262
void ptlrpc_init_xid(void);
6363

0 commit comments

Comments
 (0)